Commit 0c8e7f49 authored by James Lopez's avatar James Lopez

add missing user updates

parent 831b2fcc
...@@ -53,7 +53,7 @@ class User < ActiveRecord::Base ...@@ -53,7 +53,7 @@ class User < ActiveRecord::Base
lease = Gitlab::ExclusiveLease.new("user_update_tracked_fields:#{id}", timeout: 1.hour.to_i) lease = Gitlab::ExclusiveLease.new("user_update_tracked_fields:#{id}", timeout: 1.hour.to_i)
return unless lease.try_obtain return unless lease.try_obtain
save(validate: false) Users::UpdateService.new(self, self).execute(validate: false)
end end
attr_accessor :force_random_password attr_accessor :force_random_password
...@@ -965,7 +965,7 @@ class User < ActiveRecord::Base ...@@ -965,7 +965,7 @@ class User < ActiveRecord::Base
if attempts_exceeded? if attempts_exceeded?
lock_access! unless access_locked? lock_access! unless access_locked?
else else
save(validate: false) Users::UpdateService.new(self, self).execute(validate: false)
end end
end end
...@@ -1123,7 +1123,8 @@ class User < ActiveRecord::Base ...@@ -1123,7 +1123,8 @@ class User < ActiveRecord::Base
email: email, email: email,
&creation_block &creation_block
) )
user.save(validate: false)
Users::UpdateService.new(user, user).execute(validate: false)
user user
ensure ensure
Gitlab::ExclusiveLease.cancel(lease_key, uuid) Gitlab::ExclusiveLease.cancel(lease_key, uuid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment