liquid_feedback_frontend
view app/main/member/_action/update_notify_level.lua @ 1346:19cdb6123514
Fixed creating account with verification images
| author | bsw | 
|---|---|
| date | Sun Aug 05 19:25:02 2018 +0200 (2018-08-05) | 
| parents | b04fa071ba05 | 
| children | 2626155efb83 | 
 line source
     1 local disable_notifications = param.get("disable_notifications") == "true" and true or false
     3 if app.session.member.disable_notifications ~= disable_notifications then
     4   IgnoredArea:destroy_by_member_id(app.session.member_id)
     5   app.session.member.disable_notifications = disable_notifications
     6 end
     8 if app.session.member.disable_notifications then
     9   app.session.member.notification_dow = nil
    10   app.session.member.notification_hour = nil
    11 else 
    12   if param.get("digest") == "true" then
    13     local dow = param.get("notification_dow")
    14     if dow == "daily" then
    15       app.session.member.notification_dow = nil
    16     else
    17       app.session.member.notification_dow = tonumber(dow)
    18     end
    19     app.session.member.notification_hour = tonumber(param.get("notification_hour"))
    20   else
    21     app.session.member.notification_dow = nil
    22     app.session.member.notification_hour = nil
    23   end
    24 end
    26 app.session.member:save()
