diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-30 17:17:03 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-30 17:17:03 +0300 |
commit | d386bb780864f4fc36490e19ea654f31bf193d0f (patch) | |
tree | 48adcf65b79c5f1eaf11519007a776568cdd9b01 /app/controllers/admin/users_controller.rb | |
parent | 39a55bdf1a1613f362bcd7da444b291210454160 (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.rb | 3 |
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." } |