display a message if the user has no email ... to reset password
This commit is contained in:
@@ -57,7 +57,7 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
initialize_primary_tabs (u)
|
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
|
across
|
||||||
fd as c
|
fd as c
|
||||||
loop
|
loop
|
||||||
@@ -67,7 +67,7 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
b.append ("</li>")
|
b.append ("</li>")
|
||||||
end
|
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
|
l_uuid := (create {UUID_GENERATOR}).generate_uuid
|
||||||
e := new_password_email (u, l_mail_address, l_uuid.out)
|
e := new_password_email (u, l_mail_address, l_uuid.out)
|
||||||
u.set_data_item ("new_password_extra", 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)
|
service.mailer.safe_process_email (e)
|
||||||
add_success_message ("Further instructions have been sent to your e-mail address.")
|
add_success_message ("Further instructions have been sent to your e-mail address.")
|
||||||
set_redirection (url ("/user", Void))
|
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
|
end
|
||||||
set_main_content (b)
|
set_main_content (b)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user