Commit 57a27579 authored by Brett Walker's avatar Brett Walker

grab the correct username when confirming secondary email

parent d5e2f873
......@@ -15,7 +15,8 @@ class ConfirmationsController < Devise::ConfirmationsController
if signed_in?(:user)
after_sign_in(resource)
else
Gitlab::AppLogger.info("Email Confirmed: username=#{resource.username} email=#{resource.email} ip=#{request.remote_ip}")
username = (_resource_name == :email ? resource.user.username : resource.username)
Gitlab::AppLogger.info("Email Confirmed: username=#{username} email=#{resource.email} ip=#{request.remote_ip}")
flash[:notice] += " Please sign in."
new_session_path(:user)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment