Method: Marty::ApplicationController#logout_user

Defined in:
app/controllers/marty/application_controller.rb

#logout_userObject

Logs out current user



104
105
106
107
108
109
110
111
# File 'app/controllers/marty/application_controller.rb', line 104

def logout_user
  if Marty::User.current
    cookies.delete :autologin
    Marty::Token.where(user_id: Marty::User.current.id).delete_all unless
      Marty::Util.db_in_recovery?
    set_user(nil)
  end
end