提交 7dac9624 编写于 作者: B Brian Neel

Remove lock reason and add guard clause

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册