Don't reset the session when the token refers to an invalid user

During account creation it is quite normal for the token in the
session to refer to a user that is not active yet.
This commit is contained in:
Tom Hughes 2011-11-07 21:40:42 +00:00
parent 5bc3054d61
commit 9e2132b83d

View file

@ -40,8 +40,6 @@ class ApplicationController < ActionController::Base
elsif session[:token]
if @user = User.authenticate(:token => session[:token])
session[:user] = @user.id
else
reset_session
end
end
rescue Exception => ex