X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2f77efe7e6c828248c0848427c9f511cdfda3098..c485ae32490ccf98dcbea96af6218b25540f5eaa:/app/controllers/application_controller.rb?ds=sidebyside diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ec2f381fc..d58bc8922 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -35,8 +35,9 @@ class ApplicationController < ActionController::Base end end elsif session[:token] - @user = User.authenticate(:token => session[:token]) - session[:user] = @user.id + if @user = User.authenticate(:token => session[:token]) + session[:user] = @user.id + end end rescue Exception => ex logger.info("Exception authorizing user: #{ex.to_s}")