Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-09-27 12:25:43 +0300
committerJames Lopez <james@jameslopez.es>2017-09-27 12:25:43 +0300
commit6d272675bbe30786ca0ff8950b2009c561e3bb62 (patch)
tree305530dce887d1f9388b8bf01b0dbe4e529a927b /lib/gitlab
parent667598077b1459ee4ae6d11efd6210ad30890d3f (diff)
refactor users update service
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/ldap/access.rb4
-rw-r--r--lib/gitlab/o_auth/user.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/ldap/access.rb b/lib/gitlab/ldap/access.rb
index 8d9c63624a5..95d39fce52f 100644
--- a/lib/gitlab/ldap/access.rb
+++ b/lib/gitlab/ldap/access.rb
@@ -20,7 +20,7 @@ module Gitlab
# permissions to keep things clean
if access.allowed?
access.update_user
- Users::UpdateService.new(user, user, last_credential_check_at: Time.now).execute
+ Users::UpdateService.new(user, user: user, last_credential_check_at: Time.now).execute
true
else
@@ -172,7 +172,7 @@ module Gitlab
return false if user.email == ldap_email
- Users::UpdateService.new(user, user, email: ldap_email).execute do |user|
+ Users::UpdateService.new(user, user: user, email: ldap_email).execute do |user|
user.skip_reconfirmation!
end
end
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb
index 60b6ed23c87..619241502a2 100644
--- a/lib/gitlab/o_auth/user.rb
+++ b/lib/gitlab/o_auth/user.rb
@@ -34,7 +34,7 @@ module Gitlab
block_after_save = needs_blocking?
- Users::UpdateService.new(gl_user, gl_user).execute!
+ Users::UpdateService.new(gl_user, user: gl_user).execute!
gl_user.block if block_after_save