diff options
author | George Andrinopoulos <geoandri@gmail.com> | 2017-02-02 12:46:14 +0200 |
---|---|---|
committer | George Andrinopoulos <geoandri@gmail.com> | 2017-02-02 12:47:23 +0200 |
commit | 19dda1606b4dc76160bf2198ab95f2998eccaec8 (patch) | |
tree | a423654e591727b8d15ef878e424f267abbc47a1 /lib | |
parent | fabdcf818b5bfb45edd3a4ffbf1382b4ec9662d2 (diff) | |
download | gitlab-ce-19dda1606b4dc76160bf2198ab95f2998eccaec8.tar.gz |
Force new password after password reset via API
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/users.rb | 2 |
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 |