# HG changeset patch # User bsw # Date 1330973606 -3600 # Node ID cf25fef4b202a664ff1db34d2530c23a2d5b19bb # Parent d75ace4af6167ccaa762e10ca226a54b1d9352a5 Send confirmation mail after registration only when email address has been changed diff -r d75ace4af616 -r cf25fef4b202 app/main/index/_action/register.lua --- a/app/main/index/_action/register.lua Mon Mar 05 17:44:59 2012 +0100 +++ b/app/main/index/_action/register.lua Mon Mar 05 19:53:26 2012 +0100 @@ -195,12 +195,14 @@ member.login = login member.name = name - local success = member:set_notify_email(notify_email) - if not success then - slot.put_into("error", _"Can't send confirmation email") - return + if notify_email ~= member.notify_email then + local success = member:set_notify_email(notify_email) + if not success then + slot.put_into("error", _"Can't send confirmation email") + return + end end - + member:set_password(password1) local now = db:query("SELECT now() AS now", "object").now