Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sessions_controller.rb « controllers « app - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0f3bd1c46d96eb0acfc4b6cf8a4e4bea40ae14dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#   the COPYRIGHT file.

class SessionsController < Devise::SessionsController
  after_action :reset_authentication_token, only: [:create]
  before_action :reset_authentication_token, only: [:destroy]

  def reset_authentication_token
    current_user.reset_authentication_token! unless current_user.nil?
  end
end