summaryrefslogtreecommitdiff
path: root/app/controllers/profiles
diff options
context:
space:
mode:
authorBrett Walker <brett@digitalmoksha.com>2017-09-04 19:23:33 +0200
committerBrett Walker <brett@digitalmoksha.com>2017-09-23 15:23:11 +0200
commitf9f467227538df0ce2012df39dfdcf55fb260f94 (patch)
tree7ebabd8226e6db955d77ca456406197b6a8c0e6b /app/controllers/profiles
parentb14641579855a14398db260ab909ae77c164c883 (diff)
downloadgitlab-ce-f9f467227538df0ce2012df39dfdcf55fb260f94.tar.gz
Send a confirmation email when the user adds a secondary email address. Utilizes the Devise `confirmable` capabilities. Issue #37385
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r--app/controllers/profiles/emails_controller.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/profiles/emails_controller.rb b/app/controllers/profiles/emails_controller.rb
index ddb67d1c4d1..60426e4f14f 100644
--- a/app/controllers/profiles/emails_controller.rb
+++ b/app/controllers/profiles/emails_controller.rb
@@ -6,10 +6,7 @@ class Profiles::EmailsController < Profiles::ApplicationController
def create
@email = Emails::CreateService.new(current_user, email_params).execute
-
- if @email.errors.blank?
- NotificationService.new.new_email(@email)
- else
+ unless @email.errors.blank?
flash[:alert] = @email.errors.full_messages.first
end