Skip to content

Commit

Permalink
Fix login bug a little better. [#92]
Browse files Browse the repository at this point in the history
  • Loading branch information
marnen committed Sep 10, 2014
1 parent 7aa3820 commit 707bf9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Expand Up @@ -70,7 +70,6 @@ def regenerate_key

# Resets password of user specified in <tt>params[:email]</tt>, and sends the new password to the user by e-mail.
def reset
current_user_session.try :destroy
if request.post?
user = User.find_by_email(params[:email])
if user.nil?
Expand All @@ -88,6 +87,7 @@ def reset
else
@page_title = _("Reset password")
end
current_user_session.try :destroy
end

protected
Expand Down
1 change: 1 addition & 0 deletions features/keep_user_logged_out_on_password_reset.feature
Expand Up @@ -9,6 +9,7 @@ Feature: Keep user logged out on password reset
And I am on the password reset page
When I fill in "email" with "<email>"
And I press "Reset password"
And I go to the event list
Then I should not be logged in
And I should not see "<name>"

Expand Down

0 comments on commit 707bf9e

Please sign in to comment.