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:
parent
7e4aa9ca92
commit
e109c9b6b6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue