diff options
author | Muhammad Nuzaihan <muhammad@taqisystems.com> | 2018-07-25 16:15:04 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-25 16:15:04 +0000 |
commit | 42d44009eed474d5ac70383175fcd652194a5b7b (patch) | |
tree | 4bcc3ef5f9122b38cb34bfa79431126aa8dcf40d /app | |
parent | d8e759802ec28c89ab0b07d6d748748dda3254a6 (diff) | |
download | gitlab-ce-42d44009eed474d5ac70383175fcd652194a5b7b.tar.gz |
fixes #47716 where email confirmation fails after adding additional emails
Diffstat (limited to 'app')
-rw-r--r-- | app/models/email.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/email.rb b/app/models/email.rb index d6516761f0a..15bdedeac33 100644 --- a/app/models/email.rb +++ b/app/models/email.rb @@ -25,6 +25,10 @@ class Email < ActiveRecord::Base self.errors.add(:email, 'has already been taken') if User.exists?(email: self.email) end + def accept_pending_invitations! + user.accept_pending_invitations! + end + # once email is confirmed, update the gpg signatures def update_invalid_gpg_signatures user.update_invalid_gpg_signatures if confirmed? |