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:
parent
02b330de70
commit
27a8e0fbca
1 changed files with 1 additions and 1 deletions
|
|
@ -7,6 +7,6 @@ class SessionsController < Devise::SessionsController
|
||||||
before_filter :reset_authentication_token, :only => [:destroy]
|
before_filter :reset_authentication_token, :only => [:destroy]
|
||||||
|
|
||||||
def reset_authentication_token
|
def reset_authentication_token
|
||||||
current_user.reset_authentication_token!
|
current_user.reset_authentication_token! unless current_user.nil?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue