Commit 00882b3c33cb377b903cdf8e2b91149081739785
1 parent
46231f0f
Exists in
master
and in
4 other branches
Prevent infinit password change by settin password_expires_at to nil
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
app/controllers/passwords_controller.rb
| ... | ... | @@ -19,7 +19,8 @@ class PasswordsController < ApplicationController |
| 19 | 19 | ) |
| 20 | 20 | |
| 21 | 21 | if result |
| 22 | - redirect_to root_path(notice: 'Password successfully changed') | |
| 22 | + @user.update_attributes(password_expires_at: nil) | |
| 23 | + redirect_to root_path, notice: 'Password successfully changed' | |
| 23 | 24 | else |
| 24 | 25 | render :new |
| 25 | 26 | end | ... | ... |