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:
authorBrett Walker <brett@digitalmoksha.com>2017-09-09 16:55:07 +0300
committerBrett Walker <brett@digitalmoksha.com>2017-09-23 16:23:11 +0300
commitcf8a5bcaec99cc197ff556793febb8317e1db220 (patch)
tree0c709b59f04d02eb572f01aca2caf059336bffeb /app/controllers
parentc56208f98028d10f8f2ab315ae52e9fcacc45399 (diff)
add verified/unverified labels to profile emails.
added "Resend confirmation email" for unverified emails
Diffstat (limited to 'app/controllers')
-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