From c1d913e67d80c4f674d67209d73e7a12751f7cb5 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Fri, 1 Mar 2013 18:11:03 +0100 Subject: [PATCH] display a message if the user has no email ... to reset password --- .../cms/src/modules/user/user_new_password_cms_execution.e | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/draft/application/cms/src/modules/user/user_new_password_cms_execution.e b/draft/application/cms/src/modules/user/user_new_password_cms_execution.e index 00b1af92..492b320a 100644 --- a/draft/application/cms/src/modules/user/user_new_password_cms_execution.e +++ b/draft/application/cms/src/modules/user/user_new_password_cms_execution.e @@ -57,7 +57,7 @@ feature -- Execution end end initialize_primary_tabs (u) - if fd /= Void and then fd.is_valid then + if fd /= Void and then fd.is_valid and then u /= Void then across fd as c loop @@ -67,7 +67,7 @@ feature -- Execution end b.append ("") end - if u /= Void and then attached u.email as l_mail_address then + if attached u.email as l_mail_address then l_uuid := (create {UUID_GENERATOR}).generate_uuid e := new_password_email (u, l_mail_address, l_uuid.out) u.set_data_item ("new_password_extra", l_uuid.out) @@ -75,6 +75,9 @@ feature -- Execution service.mailer.safe_process_email (e) add_success_message ("Further instructions have been sent to your e-mail address.") set_redirection (url ("/user", Void)) + else + add_success_message ("No email is associated with the requested account. Please contact the webmaster for help.") + set_redirection (url ("/user", Void)) end set_main_content (b) else