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:
authorDouwe Maan <douwe@gitlab.com>2015-04-30 17:17:03 +0300
committerDouwe Maan <douwe@gitlab.com>2015-04-30 17:17:03 +0300
commitd386bb780864f4fc36490e19ea654f31bf193d0f (patch)
tree48adcf65b79c5f1eaf11519007a776568cdd9b01 /app/controllers/admin/users_controller.rb
parent39a55bdf1a1613f362bcd7da444b291210454160 (diff)
Allow primary email to be set to an email that you've already added.
Diffstat (limited to 'app/controllers/admin/users_controller.rb')
-rw-r--r--app/controllers/admin/users_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index adb83996f8b..d36e359934c 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -102,8 +102,7 @@ class Admin::UsersController < Admin::ApplicationController
email = user.emails.find(params[:email_id])
email.destroy
- user.set_notification_email
- user.save if user.notification_email_changed?
+ user.update_secondary_emails!
respond_to do |format|
format.html { redirect_to :back, notice: "Successfully removed email." }