diff options
author | James Lopez <james@jameslopez.es> | 2017-06-23 16:44:34 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-06-23 16:44:34 +0200 |
commit | 8f2adb8084c15026115aed39a06e9af04c5e7957 (patch) | |
tree | 93514c9738c09a9571ee8683ebc532c77cee005c /app/services/emails | |
parent | 0925f30134c9e4291a61241536fcea16e98ce90d (diff) | |
download | gitlab-ce-8f2adb8084c15026115aed39a06e9af04c5e7957.tar.gz |
fix bug in emails destroy service
Diffstat (limited to 'app/services/emails')
-rw-r--r-- | app/services/emails/base_service.rb | 3 | ||||
-rw-r--r-- | app/services/emails/destroy_service.rb | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/app/services/emails/base_service.rb b/app/services/emails/base_service.rb index 8810f6d8803..ace49889097 100644 --- a/app/services/emails/base_service.rb +++ b/app/services/emails/base_service.rb @@ -1,7 +1,6 @@ module Emails class BaseService - def initialize(current_user, user, opts) - @current_user = current_user + def initialize(user, opts) @user = user @email = opts[:email] end diff --git a/app/services/emails/destroy_service.rb b/app/services/emails/destroy_service.rb index 2032f0dc3a9..d586b9dfe0c 100644 --- a/app/services/emails/destroy_service.rb +++ b/app/services/emails/destroy_service.rb @@ -7,7 +7,7 @@ module Emails private def update_secondary_emails! - result = ::Users::UpdateService.new(@current_user).execute do |user| + result = ::Users::UpdateService.new(@user).execute do |user| user.update_secondary_emails! end |