summaryrefslogtreecommitdiff
path: root/app/controllers/confirmations_controller.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-10-05 12:12:30 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-10-05 12:12:30 +0000
commit1fe7a42afca83fbbda638d9569d58a87039cd8f2 (patch)
tree507402412502a3faae74ad3be29f31ed2f7da366 /app/controllers/confirmations_controller.rb
parent3594a67d30f26247e0234784c4cea7a238c5e417 (diff)
parent782c017ca0c85311373d53d49d3b9af642b6a85d (diff)
downloadgitlab-ce-1fe7a42afca83fbbda638d9569d58a87039cd8f2.tar.gz
Merge branch 'digitalmoksha/gitlab-ce-feature/verify_secondary_emails' into 'master'
Send a confirmation email when the user adds a secondary email address Closes #37385, #28621, and #36959 See merge request gitlab-org/gitlab-ce!14703
Diffstat (limited to 'app/controllers/confirmations_controller.rb')
-rw-r--r--app/controllers/confirmations_controller.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb
index 0c2646d7bf0..80ab681ed87 100644
--- a/app/controllers/confirmations_controller.rb
+++ b/app/controllers/confirmations_controller.rb
@@ -10,13 +10,14 @@ class ConfirmationsController < Devise::ConfirmationsController
users_almost_there_path
end
- def after_confirmation_path_for(resource_name, resource)
- if signed_in?(resource_name)
+ def after_confirmation_path_for(_resource_name, resource)
+ # incoming resource can either be a :user or an :email
+ if signed_in?(:user)
after_sign_in(resource)
else
Gitlab::AppLogger.info("Email Confirmed: username=#{resource.username} email=#{resource.email} ip=#{request.remote_ip}")
flash[:notice] += " Please sign in."
- new_session_path(resource_name)
+ new_session_path(:user)
end
end