Skip to content

Commit

Permalink
Bugfix: Reload view if email is nil or empty
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-odowd committed Oct 21, 2022
1 parent 3f0b51f commit 70f77ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/password_retrieval_controller.rb
Expand Up @@ -10,6 +10,7 @@ def forgotten
def send_password
if params[:user][:email].nil? || params[:user][:email].strip.empty?
flash[:error] = 'Please enter an e-mail address.'
render template: 'password_retrieval/forgotten'
else
user = User.find_by(email: params[:user][:email])
if user
Expand Down

0 comments on commit 70f77ac

Please sign in to comment.