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:
authorJames Lopez <james@jameslopez.es>2017-06-19 11:04:14 +0300
committerJames Lopez <james@jameslopez.es>2017-06-23 12:41:42 +0300
commit3bab585bec5529c06ba4b0c4ae7e953b99edf6d3 (patch)
tree2751c7f6bc3959204dbf5fb90d42f56c773650c6 /app/models
parentad44af2faaaa872ee30922699f66ac78fa402336 (diff)
update to use emails destroy service
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 954a30155f7..bc754768ab1 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -494,7 +494,7 @@ class User < ActiveRecord::Base
def update_emails_with_primary_email
primary_email_record = emails.find_by(email: email)
if primary_email_record
- primary_email_record.destroy
+ Emails::DestroyService.new(self, self, email: email).execute
emails.create(email: email_was)
update_secondary_emails!