Skip to content
Snippets Groups Projects
Commit ed27da8d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Wes Gurney
Browse files

Fix password update

parent 7519e6f6
No related branches found
No related tags found
1 merge request!4954Add support to configure webhook_timeout in gitlab.yaml
Loading
Loading
@@ -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])
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment