summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb7
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?