diff options
author | James Lopez <james@jameslopez.es> | 2017-06-20 09:29:36 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-06-23 11:41:42 +0200 |
commit | 0c8e7f49d1ef32ed5ea1bdd7e26dd5e169bad359 (patch) | |
tree | 8f08f6018297e2eb9347f7ead5e94c7cbeecc07b | |
parent | 831b2fccf9a2efc772d62c05f52c612f23a63ea9 (diff) | |
download | gitlab-ce-0c8e7f49d1ef32ed5ea1bdd7e26dd5e169bad359.tar.gz |
add missing user updates
-rw-r--r-- | app/models/user.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 6ca78278db8..117f54cf312 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -53,7 +53,7 @@ class User < ActiveRecord::Base lease = Gitlab::ExclusiveLease.new("user_update_tracked_fields:#{id}", timeout: 1.hour.to_i) return unless lease.try_obtain - save(validate: false) + Users::UpdateService.new(self, self).execute(validate: false) end attr_accessor :force_random_password @@ -965,7 +965,7 @@ class User < ActiveRecord::Base if attempts_exceeded? lock_access! unless access_locked? else - save(validate: false) + Users::UpdateService.new(self, self).execute(validate: false) end end @@ -1123,7 +1123,8 @@ class User < ActiveRecord::Base email: email, &creation_block ) - user.save(validate: false) + + Users::UpdateService.new(user, user).execute(validate: false) user ensure Gitlab::ExclusiveLease.cancel(lease_key, uuid) |