diff options
author | Brett Walker <brett@digitalmoksha.com> | 2017-09-09 15:55:07 +0200 |
---|---|---|
committer | Brett Walker <brett@digitalmoksha.com> | 2017-09-23 15:23:11 +0200 |
commit | cf8a5bcaec99cc197ff556793febb8317e1db220 (patch) | |
tree | 0c709b59f04d02eb572f01aca2caf059336bffeb /app/controllers/profiles | |
parent | c56208f98028d10f8f2ab315ae52e9fcacc45399 (diff) | |
download | gitlab-ce-cf8a5bcaec99cc197ff556793febb8317e1db220.tar.gz |
add verified/unverified labels to profile emails.
added "Resend confirmation email" for unverified emails
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/emails_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/profiles/emails_controller.rb b/app/controllers/profiles/emails_controller.rb index 60426e4f14f..152b71e687d 100644 --- a/app/controllers/profiles/emails_controller.rb +++ b/app/controllers/profiles/emails_controller.rb @@ -24,6 +24,16 @@ class Profiles::EmailsController < Profiles::ApplicationController end end + def resend_confirmation_instructions + @email = current_user.emails.find(params[:id]) + if @email && Emails::ConfirmService.new(current_user, email: @email.email).execute + flash[:notice] = "Confirmation email sent to #{@email.email}" + else + flash[:alert] = "There was a problem sending the confirmation email" + end + redirect_to profile_emails_url + end + private def email_params |