Commit 9ef7af7a authored by Dmitry Gruzd's avatar Dmitry Gruzd

Merge branch 'djensen-remove-unnecessary-email-unset-conditions' into 'master'

Remove if blank conditions from email unsetters

See merge request gitlab-org/gitlab!68683
parents c964931b 2fd960ad
......@@ -2007,19 +2007,19 @@ class User < ApplicationRecord
end
def set_notification_email
if notification_email.blank? || verified_emails.exclude?(notification_email)
if verified_emails.exclude?(notification_email)
self.notification_email = nil
end
end
def set_public_email
if public_email.blank? || verified_emails.exclude?(public_email)
if verified_emails.exclude?(public_email)
self.public_email = ''
end
end
def set_commit_email
if commit_email.blank? || verified_emails.exclude?(commit_email)
if verified_emails.exclude?(commit_email)
self.commit_email = nil
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment