diff options
author | James Lopez <james@jameslopez.es> | 2017-09-20 11:00:06 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-09-28 08:46:39 +0200 |
commit | 9621dd0c9d31508bdac2e2e226537302b560ef10 (patch) | |
tree | f4e76be89a6cb1a85b04e87cdf33bb408f2bf63f /app/controllers/profiles/passwords_controller.rb | |
parent | 11c8b8bc3c2294ef2e3a33196619f6e61f1e8d82 (diff) | |
download | gitlab-ce-9621dd0c9d31508bdac2e2e226537302b560ef10.tar.gz |
refactor services to match EE signature
Diffstat (limited to 'app/controllers/profiles/passwords_controller.rb')
-rw-r--r-- | app/controllers/profiles/passwords_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/profiles/passwords_controller.rb b/app/controllers/profiles/passwords_controller.rb index 7beb52dd8e8..08b438de9e2 100644 --- a/app/controllers/profiles/passwords_controller.rb +++ b/app/controllers/profiles/passwords_controller.rb @@ -21,10 +21,10 @@ class Profiles::PasswordsController < Profiles::ApplicationController password_automatically_set: false } - result = Users::UpdateService.new(@user, password_attributes).execute + result = Users::UpdateService.new(current_user, @user, password_attributes).execute if result[:status] == :success - Users::UpdateService.new(@user, password_expires_at: nil).execute + Users::UpdateService.new(current_user, @user, password_expires_at: nil).execute redirect_to root_path, notice: 'Password successfully changed' else @@ -46,7 +46,7 @@ class Profiles::PasswordsController < Profiles::ApplicationController return end - result = Users::UpdateService.new(@user, password_attributes).execute + result = Users::UpdateService.new(current_user, @user, password_attributes).execute if result[:status] == :success flash[:notice] = "Password was successfully updated. Please login with it" |