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

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
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment