summaryrefslogtreecommitdiff
path: root/app/controllers/confirmations_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-10-05 12:48:22 +0200
committerDouwe Maan <douwe@selenight.nl>2017-10-05 12:48:22 +0200
commit0c0c2ecd99cd5c4cb22a0c045f8d45d315203832 (patch)
tree3900ccdcdff0cd6b8e3ed281ba57a317b801ad08 /app/controllers/confirmations_controller.rb
parented3c25e4294bfc75f7167ed63e30561e39ac3a97 (diff)
parentde01353b166018a43ea92b38054b1267c3ba5cea (diff)
downloadgitlab-ce-0c0c2ecd99cd5c4cb22a0c045f8d45d315203832.tar.gz
Merge branch 'master' into digitalmoksha/gitlab-ce-feature/verify_secondary_emails
# Conflicts: # app/controllers/admin/users_controller.rb # app/controllers/confirmations_controller.rb # app/controllers/profiles/emails_controller.rb # app/models/user.rb # app/services/emails/base_service.rb # app/services/emails/destroy_service.rb # app/views/devise/mailer/confirmation_instructions.html.haml # lib/api/users.rb # spec/services/emails/destroy_service_spec.rb
Diffstat (limited to 'app/controllers/confirmations_controller.rb')
-rw-r--r--app/controllers/confirmations_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb
index 62ee9470704..80ab681ed87 100644
--- a/app/controllers/confirmations_controller.rb
+++ b/app/controllers/confirmations_controller.rb
@@ -13,10 +13,15 @@ class ConfirmationsController < Devise::ConfirmationsController
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_path_for(resource)
+ 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(:user)
end
end
+
+ def after_sign_in(resource)
+ after_sign_in_path_for(resource)
+ end
end