删除所有的域的autologin

This commit is contained in:
guange 2015-05-28 09:51:32 +08:00
parent aaf7d645ba
commit 5279c2d3e5
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ class ApplicationController < ActionController::Base
# Logs out current user # Logs out current user
def logout_user def logout_user
if User.current.logged? if User.current.logged?
cookies.delete(autologin_cookie_name, domain: Redmine::Configuration['cookie_domain']) cookies.delete(autologin_cookie_name, domain: :all)
# Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin']) # Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin'])
self.logged_user = nil self.logged_user = nil
end end