diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-07-08 17:29:56 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-07-08 17:29:56 +0000 |
commit | 562dea3aa874480ca30875b25fac6f96b9d10517 (patch) | |
tree | 7a7d098f7daf1725f62cd803787cd5d043c6b4ac /app/controllers/application_controller.rb | |
parent | b15d6fc544033c580e28036d217c97edf75218a9 (diff) | |
download | redmine-562dea3aa874480ca30875b25fac6f96b9d10517.tar.gz redmine-562dea3aa874480ca30875b25fac6f96b9d10517.zip |
avoid using rescue in its modifier form at ApplicationController#find_current_user
git-svn-id: http://svn.redmine.org/redmine/trunk@19862 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6ccf75546..fca9ebc90 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -106,7 +106,12 @@ class ApplicationController < ActionController::Base unless api_request? if session[:user_id] # existing session - user = (User.active.find(session[:user_id]) rescue nil) + user = + begin + User.active.find(session[:user_id]) + rescue + nil + end elsif autologin_user = try_to_autologin user = autologin_user elsif params[:format] == 'atom' && params[:key] && request.get? && accept_rss_auth? |