diff --git a/app/mailers/newflow_mailer.rb b/app/mailers/newflow_mailer.rb index 24382ff17..75e327e8e 100644 --- a/app/mailers/newflow_mailer.rb +++ b/app/mailers/newflow_mailer.rb @@ -9,7 +9,7 @@ def create_password_email(user:, email:) def reset_password_email(user:, email_address:) @user = user - head :forbidden if user.login_token.nil? || user.login_token_expired? + raise "No valid login token" if user.login_token.nil? || user.login_token_expired? mail to: "\"#{user.full_name}\" <#{email_address}>", subject: "Reset your OpenStax password"