liquid_feedback_frontend
view app/main/index/_action/confirm_notify_email.lua @ 1160:65904de98d5e
Fixed basepath for image delivery with WebMCP 1.2.6
| author | bsw |
|---|---|
| date | Tue Mar 24 12:36:19 2015 +0100 (2015-03-24) |
| parents | 733f65c0c0a0 |
| children |
line source
1 local secret = param.get("secret")
3 local member = Member:new_selector()
4 :add_where{ "notify_email_secret = ?", secret }
5 :add_where("notify_email_secret_expiry > now()")
6 :optional_object_mode()
7 :exec()
9 if member then
10 member.notify_email = member.notify_email_unconfirmed
11 member.notify_email_unconfirmed = nil
12 member.notify_email_secret = nil
13 member.notify_email_secret_expiry = nil
14 member.notify_email_lock_expiry = nil
15 member:save()
16 slot.put_into("notice", _"Email address is confirmed now")
17 else
18 slot.put_into("error", _"Confirmation code invalid!")
19 return false
20 end
