mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
clear mini profiler cookie when admin logs off
This commit is contained in:
parent
e3e31441b8
commit
52c3b0b0ce
1 changed files with 6 additions and 0 deletions
|
@ -90,6 +90,12 @@ class Auth::DefaultCurrentUserProvider
|
|||
if SiteSetting.log_out_strict && (user = current_user)
|
||||
user.auth_token = nil
|
||||
user.save!
|
||||
|
||||
if user.admin && defined?(Rack::MiniProfiler)
|
||||
# clear the profiling cookie to keep stuff tidy
|
||||
cookies["__profilin"] = nil
|
||||
end
|
||||
|
||||
MessageBus.publish "/logout", user.id, user_ids: [user.id]
|
||||
end
|
||||
cookies[TOKEN_COOKIE] = nil
|
||||
|
|
Loading…
Reference in a new issue