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:
Diffstat (limited to 'app/controllers/profiles/emails_controller.rb')
-rw-r--r--app/controllers/profiles/emails_controller.rb10
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