summaryrefslogtreecommitdiff
path: root/lib/api/users.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-06-15 16:42:14 +0200
committerJames Lopez <james@jameslopez.es>2017-06-23 11:41:41 +0200
commitef6a4240e534f2a12dbfb45c2decd31abf9a3c26 (patch)
tree569f9055ec2e6b4761e2d4faeeaaf89a33c68482 /lib/api/users.rb
parent04bb82c8b8cb3033c805ea5158b01c09284ac3db (diff)
downloadgitlab-ce-ef6a4240e534f2a12dbfb45c2decd31abf9a3c26.tar.gz
update notification settings, fix api specs
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r--lib/api/users.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index c10e3364382..733b65b1c8e 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -156,7 +156,9 @@ module API
user_params[:password_expires_at] = Time.now if user_params[:password].present?
- if user.update_attributes(user_params.except(:extern_uid, :provider))
+ result = ::Users::UpdateService.new(current_user, user, user_params.except(:extern_uid, :provider)).execute
+
+ if result[:status] == :success
present user, with: Entities::UserPublic
else
render_validation_error!(user)