diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5b83ce553..078c7fa7d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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 diff --git a/app/models/user.rb b/app/models/user.rb index 0afb1e4aa..013bc1888 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -417,9 +417,6 @@ returns # reset login failed self.login_failed = 0 - # set updated by user - self.updated_by_id = id - save end