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:
Diffstat (limited to 'app/models/email.rb')
-rw-r--r--app/models/email.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/email.rb b/app/models/email.rb
index c5154267ff0..0140f784842 100644
--- a/app/models/email.rb
+++ b/app/models/email.rb
@@ -22,7 +22,7 @@ class Email < ApplicationRecord
self.reconfirmable = false # currently email can't be changed, no need to reconfirm
- delegate :username, :can?, to: :user
+ delegate :username, :can?, :pending_invitations, :accept_pending_invitations!, to: :user
def email=(value)
write_attribute(:email, value.downcase.strip)
@@ -32,10 +32,6 @@ class Email < ApplicationRecord
self.errors.add(:email, 'has already been taken') if User.exists?(email: self.email)
end
- def accept_pending_invitations!
- user.accept_pending_invitations!
- end
-
def validate_email_format
self.errors.add(:email, I18n.t(:invalid, scope: 'valid_email.validations.email')) unless ValidateEmail.valid?(self.email)
end