diff options
author | James Lopez <james@jameslopez.es> | 2017-09-27 11:48:33 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-09-28 08:46:39 +0200 |
commit | 67d06dee30379fc93be196e2cf509660d1661aea (patch) | |
tree | de02bb9866dcc70cc7e65f9599bc7e8392060775 /app/models/user.rb | |
parent | cbb90d8f84d1f79560066d8ea3c6346906e7da94 (diff) | |
download | gitlab-ce-67d06dee30379fc93be196e2cf509660d1661aea.tar.gz |
refactor users update service
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index e9a3aea44c4..94674528012 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -60,7 +60,7 @@ class User < ActiveRecord::Base lease = Gitlab::ExclusiveLease.new("user_update_tracked_fields:#{id}", timeout: 1.hour.to_i) return unless lease.try_obtain - Users::UpdateService.new(self, self).execute(validate: false) + Users::UpdateService.new(self, user: self).execute(validate: false) end attr_accessor :force_random_password @@ -1000,7 +1000,7 @@ class User < ActiveRecord::Base if attempts_exceeded? lock_access! unless access_locked? else - Users::UpdateService.new(self, self).execute(validate: false) + Users::UpdateService.new(self, user: self).execute(validate: false) end end @@ -1186,7 +1186,7 @@ class User < ActiveRecord::Base &creation_block ) - Users::UpdateService.new(user, user).execute(validate: false) + Users::UpdateService.new(user, user: user).execute(validate: false) user ensure Gitlab::ExclusiveLease.cancel(lease_key, uuid) |