Do not reset session when a non logged in user request the login form (#4958).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3572 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2010-03-12 19:22:11 +00:00
parent 7e4aa9ca92
commit e109c9b6b6
1 changed files with 5 additions and 3 deletions

View File

@ -128,9 +128,11 @@ class AccountController < ApplicationController
private
def logout_user
cookies.delete :autologin
Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin']) if User.current.logged?
self.logged_user = nil
if User.current.logged?
cookies.delete :autologin
Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin'])
self.logged_user = nil
end
end
def authenticate_user