summaryrefslogtreecommitdiff
path: root/app/controllers/confirmations_controller.rb
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2017-10-27 16:32:48 +0200
committerBrett Walker <bwalker@gitlab.com>2017-10-27 16:32:48 +0200
commita2894b7ad2b26ff65d36b9c87b79c60ff4ddda59 (patch)
tree4565a0500c7316a826dc799cac5c7b65dabfc572 /app/controllers/confirmations_controller.rb
parent48851ff308032105234b781c61bfae8f312aced7 (diff)
downloadgitlab-ce-a2894b7ad2b26ff65d36b9c87b79c60ff4ddda59.tar.gz
use a delegate for `username` to be more future friendly
Diffstat (limited to 'app/controllers/confirmations_controller.rb')
-rw-r--r--app/controllers/confirmations_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb
index 8ca01a6e2c6..bc0948cd3fb 100644
--- a/app/controllers/confirmations_controller.rb
+++ b/app/controllers/confirmations_controller.rb
@@ -15,8 +15,7 @@ class ConfirmationsController < Devise::ConfirmationsController
if signed_in?(:user)
after_sign_in(resource)
else
- username = (resource_name == :email ? resource.user.username : resource.username)
- Gitlab::AppLogger.info("Email Confirmed: username=#{username} email=#{resource.email} ip=#{request.remote_ip}")
+ 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