lib/rodauth/features/reset_password.rb in rodauth-1.8.0 vs lib/rodauth/features/reset_password.rb in rodauth-1.9.0
- old
+ new
@@ -6,10 +6,11 @@
notice_flash "Your password has been reset"
notice_flash "An email has been sent to you with a link to reset the password for your account", 'reset_password_email_sent'
error_flash "There was an error resetting your password"
error_flash "There was an error requesting a password reset", 'reset_password_request'
+ loaded_templates %w'reset-password password-field password-confirm-field reset-password-email'
view 'reset-password', 'Reset Password'
additional_form_tags
additional_form_tags 'reset_password_request'
before
before 'reset_password_request'
@@ -144,9 +145,11 @@
if e = raised_uniqueness_violation{ds.insert(reset_password_key_insert_hash)}
# If inserting into the reset password table causes a violation, we can pull the
# existing reset password key from the table, or reraise.
raise e unless @reset_password_key_value = get_password_reset_key(account_id)
end
+ else
+ @reset_password_key_value = get_password_reset_key(account_id)
end
end
end
def remove_reset_password_key