liquid_feedback_frontend
view app/main/index/_action/confirm_notify_email.lua @ 47:8e9436ea3017
Added tag beta14 for changeset aaba4d28dd53
author | jbe |
---|---|
date | Mon Mar 15 03:10:14 2010 +0100 (2010-03-15) |
parents | 8d91bccab0bf |
children | 733f65c0c0a0 |
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:save()
14 slot.put_into("notice", _"Email address is confirmed now")
15 else
16 slot.put_into("error", _"Confirmation code invalid!")
17 return false
18 end