liquid_feedback_frontend
changeset 390:cf25fef4b202
Send confirmation mail after registration only when email address has been changed
author | bsw |
---|---|
date | Mon Mar 05 19:53:26 2012 +0100 (2012-03-05) |
parents | d75ace4af616 |
children | 4cc560fb92d4 |
files | app/main/index/_action/register.lua |
line diff
1.1 --- a/app/main/index/_action/register.lua Mon Mar 05 17:44:59 2012 +0100 1.2 +++ b/app/main/index/_action/register.lua Mon Mar 05 19:53:26 2012 +0100 1.3 @@ -195,12 +195,14 @@ 1.4 member.login = login 1.5 member.name = name 1.6 1.7 - local success = member:set_notify_email(notify_email) 1.8 - if not success then 1.9 - slot.put_into("error", _"Can't send confirmation email") 1.10 - return 1.11 + if notify_email ~= member.notify_email then 1.12 + local success = member:set_notify_email(notify_email) 1.13 + if not success then 1.14 + slot.put_into("error", _"Can't send confirmation email") 1.15 + return 1.16 + end 1.17 end 1.18 - 1.19 + 1.20 member:set_password(password1) 1.21 1.22 local now = db:query("SELECT now() AS now", "object").now