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
This commit is contained in:
Marien Fressinaud 2015-10-10 12:27:19 +02:00 committed by Dennis Schubert
parent 02b330de70
commit 27a8e0fbca

View file

@ -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