Reset UserInfo.current_user_id to 1 if no user is authenticated.
This commit is contained in:
parent
79bfd021f9
commit
6db0e5fd87
2 changed files with 4 additions and 4 deletions
|
@ -73,7 +73,10 @@ class ApplicationController < ActionController::Base
|
||||||
# Sets the current user into a named Thread location so that it can be accessed
|
# Sets the current user into a named Thread location so that it can be accessed
|
||||||
# by models and observers
|
# by models and observers
|
||||||
def set_user
|
def set_user
|
||||||
return if !current_user
|
if !current_user
|
||||||
|
UserInfo.current_user_id = 1
|
||||||
|
return
|
||||||
|
end
|
||||||
UserInfo.current_user_id = current_user.id
|
UserInfo.current_user_id = current_user.id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -417,9 +417,6 @@ returns
|
||||||
# reset login failed
|
# reset login failed
|
||||||
self.login_failed = 0
|
self.login_failed = 0
|
||||||
|
|
||||||
# set updated by user
|
|
||||||
self.updated_by_id = id
|
|
||||||
|
|
||||||
save
|
save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue