summaryrefslogtreecommitdiff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-06-19 10:04:14 +0200
committerJames Lopez <james@jameslopez.es>2017-06-23 11:41:42 +0200
commit3bab585bec5529c06ba4b0c4ae7e953b99edf6d3 (patch)
tree2751c7f6bc3959204dbf5fb90d42f56c773650c6 /app/controllers/admin
parentad44af2faaaa872ee30922699f66ac78fa402336 (diff)
downloadgitlab-ce-3bab585bec5529c06ba4b0c4ae7e953b99edf6d3.tar.gz
update to use emails destroy service
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/users_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 754d9209138..4c43d12d317 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -152,7 +152,7 @@ class Admin::UsersController < Admin::ApplicationController
def remove_email
email = user.emails.find(params[:email_id])
- email.destroy
+ Emails::DestroyService.new(current_user, self, email: email.email).execute
result = Users::UpdateService.new(current_user, @user).execute do |user|
user.update_secondary_emails!