From: Tom Hughes Date: Mon, 7 Nov 2011 21:40:42 +0000 (+0000) Subject: Don't reset the session when the token refers to an invalid user X-Git-Tag: live~6060 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/9e2132b83dbf479c5ee2ef176b74d7a3c1082da0?ds=sidebyside 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. --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c2f1e644c..f07cacbd6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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