Commit 27a8e0fb authored by Marien Fressinaud's avatar Marien Fressinaud Committed by Dennis Schubert
Browse files

Test if user is nil in #reset_authentication_token

Actually it redirects to stream page and says that user is already logged in.

Fix https://github.com/diaspora/diaspora/issues/6326
parent 02b330de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,6 +7,6 @@ class SessionsController < Devise::SessionsController
  before_filter :reset_authentication_token, :only => [:destroy]

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