Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-13 21:21:51 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-13 21:21:51 +0400
commit00882b3c33cb377b903cdf8e2b91149081739785 (patch)
tree5774060b6ec972aaca57781a30e704b81a81bd12 /app/controllers/passwords_controller.rb
parent46231f0f1d2d8aad0712ba98a6368af138a8561c (diff)
Prevent infinit password change by settin password_expires_at to nil
Diffstat (limited to 'app/controllers/passwords_controller.rb')
-rw-r--r--app/controllers/passwords_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb
index 73b06f79e0f..0e5b42178a7 100644
--- a/app/controllers/passwords_controller.rb
+++ b/app/controllers/passwords_controller.rb
@@ -19,7 +19,8 @@ class PasswordsController < ApplicationController
)
if result
- redirect_to root_path(notice: 'Password successfully changed')
+ @user.update_attributes(password_expires_at: nil)
+ redirect_to root_path, notice: 'Password successfully changed'
else
render :new
end