Commit 7dac9624 authored by Brian Neel's avatar Brian Neel

Remove lock reason and add guard clause

parent 66d9d258
......@@ -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?
......
......@@ -1063,7 +1063,7 @@ class User < ActiveRecord::Base
# override, from Devise
def lock_access!
Gitlab::AppLogger.info("Account Locked: username=#{username} reason=invalid_login_attempts")
Gitlab::AppLogger.info("Account Locked: username=#{username}")
super
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