code/prototype/vendor/bundle/ruby/2.3.0/gems/devise-4.4.3/lib/devise/controllers/sign_in_out.rb
# Sign out a given user or scope. This helper is useful for signing out a user
# after deleting accounts. Returns true if there was a logout and false if there
# is no user logged in on the referred scope
#
# Examples:
#
#   sign_out :user     # sign_out(scope)
#   sign_out @user     # sign_out(resource)
#
Sign out a given user or scope. This helper is useful for signing out a user
after deleting accounts. Returns true if there was a logout and false if there
is no user logged in on the referred scope




Sign out a given user or scope . This helper is useful for signing out a user after deleting accounts . Returns true if there was a logout and false if there is no user logged in on the referred scope
def sign_out(resource_or_scope=nil)
        return sign_out_all_scopes unless resource_or_scope
        scope = Devise::Mapping.find_scope!(resource_or_scope)
        user = warden.user(scope: scope, run_callbacks: false) 
        warden.logout(scope)
        warden.clear_strategies_cache!(scope: scope)
        instance_variable_set(:"@current_#{scope}", nil)
        !!user
      end
def sign_out ( resource_or_scope = nil ) return sign_out_all_scopes unless resource_or_scope scope = Devise :: Mapping . find_scope! ( resource_or_scope ) user = warden . user ( scope : scope , run_callbacks : false ) warden . logout ( scope ) warden . clear_strategies_cache! ( scope : scope ) instance_variable_set ( :" @current_ #{ scope } " , nil ) ! ! user end
Sign out a given user or scope.
Sign out a given user or scope .
# If there is no user
resource_or_scope
<not_specific>