Reset UserInfo.current_user_id to 1 if no user is authenticated.

This commit is contained in:
Martin Edenhofer 2016-04-13 09:32:49 +02:00
parent 79bfd021f9
commit 6db0e5fd87
2 changed files with 4 additions and 4 deletions

View file

@ -73,7 +73,10 @@ class ApplicationController < ActionController::Base
# Sets the current user into a named Thread location so that it can be accessed
# by models and observers
def set_user
return if !current_user
if !current_user
UserInfo.current_user_id = 1
return
end
UserInfo.current_user_id = current_user.id
end

View file

@ -417,9 +417,6 @@ returns
# reset login failed
self.login_failed = 0
# set updated by user
self.updated_by_id = id
save
end