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-09-24 23:12:48 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-24 23:12:48 +0400
commit09cb2ba8151a60056f4d17fb448ed79c31f02bee (patch)
tree025b4ea89342fafe46fcbc6b31b383b4fa251868 /app/controllers/profiles_controller.rb
parentffd0a985ee86691ddb4807cf9be267bdd37c7815 (diff)
Fix password update
Diffstat (limited to 'app/controllers/profiles_controller.rb')
-rw-r--r--app/controllers/profiles_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 780f47d9960..75f12f8a6af 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -33,8 +33,8 @@ class ProfilesController < ApplicationController
end
def update_password
- params[:user].select! do |key, value|
- %w(current_password password password_confirmation).include?(key.to_s)
+ password_attributes = params[:user].select do |key, value|
+ %w(password password_confirmation).include?(key.to_s)
end
unless @user.valid_password?(params[:user][:current_password])
@@ -42,7 +42,7 @@ class ProfilesController < ApplicationController
return
end
- if @user.update_attributes(params[:user])
+ if @user.update_attributes(password_attributes)
flash[:notice] = "Password was successfully updated. Please login with it"
redirect_to new_user_session_path
else