summaryrefslogtreecommitdiff
path: root/app/controllers/sessions_controller.rb
diff options
context:
space:
mode:
authorBrian Neel <brian@gitlab.com>2017-09-29 17:34:47 -0400
committerBrian Neel <brian@gitlab.com>2017-09-29 17:34:47 -0400
commit7dac9624bc19019f7432cf12ac8713a5dad03b69 (patch)
treecd33f875acc998d1b8893a26f230d61c601cf78c /app/controllers/sessions_controller.rb
parent66d9d258ad8ab168018b5fb627e59c2385d5fdc0 (diff)
downloadgitlab-ce-7dac9624bc19019f7432cf12ac8713a5dad03b69.tar.gz
Remove lock reason and add guard clause
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r--app/controllers/sessions_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index fc0c0024ad7..90bf6c51699 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -46,7 +46,9 @@ class SessionsController < Devise::SessionsController
private
def log_failed_login
- Gitlab::AppLogger.info("Failed Login: username=#{user_params[:login]} ip=#{request.remote_ip}") if failed_login?
+ return unless failed_login?
+
+ Gitlab::AppLogger.info("Failed Login: username=#{user_params[:login]} ip=#{request.remote_ip}")
end
def failed_login?