summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-02-03 09:53:02 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-02-03 09:53:02 +0000
commit25bb39225e073c451d76e7a7ddb9dedef8d43143 (patch)
tree38753ad2d5327f6dbc44090ff5c3053b65fbc1f3 /lib
parentfd46fb1cd9cc1fdf826d31261aa594baa38d4898 (diff)
parentd796e4fc371a8613e77c70f5571813818c6a35ad (diff)
downloadgitlab-ce-25bb39225e073c451d76e7a7ddb9dedef8d43143.tar.gz
Merge branch '24606-force-password-reset-on-next-login' into 'master'
Force new password after password reset via API Closes #24606 See merge request !8933
Diffstat (limited to 'lib')
-rw-r--r--lib/api/users.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 11a7368b4c0..0ed468626b7 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -160,6 +160,8 @@ module API
end
end
+ user_params.merge!(password_expires_at: Time.now) if user_params[:password].present?
+
if user.update_attributes(user_params.except(:extern_uid, :provider))
present user, with: Entities::UserPublic
else