summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-27 12:29:49 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-27 12:29:49 +0200
commitc44541a506347225539afeb2e124f3210c8b2065 (patch)
tree288f287a710dc14d6f0e973bf77ee14e0f30a92e /lib
parentede8c0ced46c67a554a90829c5b65b26f0168c67 (diff)
downloadgitlab-ce-c44541a506347225539afeb2e124f3210c8b2065.tar.gz
Improve readability and move custom matchers to better place
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/auth/activity.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/gitlab/auth/activity.rb b/lib/gitlab/auth/activity.rb
index e09ba2eeabc..d5d1428ba58 100644
--- a/lib/gitlab/auth/activity.rb
+++ b/lib/gitlab/auth/activity.rb
@@ -32,9 +32,7 @@ module Gitlab
self.class.user_password_invalid_counter_increment!
end
- if @user.present? && @user.blocked?
- self.class.user_blocked_counter_increment!
- end
+ self.class.user_blocked_counter_increment! if @user&.blocked?
end
def user_authenticated!