Skip to content

Commit 4deef91

Browse files
authored
Merge pull request #2006 from codidact/0valt/591/deletion-logout-fix
Fix automatic logout of deleted users
2 parents f8f56f5 + b42817d commit 4deef91

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

app/helpers/application_helper.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Provides helper methods for use by views under <tt>ApplicationController</tt> (and by extension, every view).
22
module ApplicationHelper
3-
include Warden::Test::Helpers
4-
53
##
64
# Is the current user a moderator or admin on the current community?
75
# @return [Boolean]
@@ -330,7 +328,7 @@ def current_user
330328
@current_user ||= warden.authenticate(scope: :user)
331329
if @current_user&.deleted? || @current_user&.community_user&.deleted?
332330
scope = Devise::Mapping.find_scope!(:user)
333-
logout scope
331+
warden.logout(scope)
334332
@current_user = nil
335333
end
336334
@current_user

0 commit comments

Comments
 (0)