mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: logging out logs you out everywhere
can be disabled by changing the setting "log_out_strict" to false
This commit is contained in:
@@ -82,6 +82,11 @@ class Auth::DefaultCurrentUserProvider
|
||||
end
|
||||
|
||||
def log_off_user(session, cookies)
|
||||
if SiteSetting.log_out_strict && (user = current_user)
|
||||
user.auth_token = nil
|
||||
user.save!
|
||||
MessageBus.publish "/logout", user.id, user_ids: [user.id]
|
||||
end
|
||||
cookies[TOKEN_COOKIE] = nil
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user