summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorGeorge Andrinopoulos <geoandri@gmail.com>2017-02-02 12:46:14 +0200
committerGeorge Andrinopoulos <geoandri@gmail.com>2017-02-02 12:47:23 +0200
commit19dda1606b4dc76160bf2198ab95f2998eccaec8 (patch)
treea423654e591727b8d15ef878e424f267abbc47a1 /lib/api
parentfabdcf818b5bfb45edd3a4ffbf1382b4ec9662d2 (diff)
downloadgitlab-ce-19dda1606b4dc76160bf2198ab95f2998eccaec8.tar.gz
Force new password after password reset via API
Diffstat (limited to 'lib/api')
-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