Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-27 13:29:49 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-27 13:29:49 +0300
commitc44541a506347225539afeb2e124f3210c8b2065 (patch)
tree288f287a710dc14d6f0e973bf77ee14e0f30a92e /lib/gitlab/auth
parentede8c0ced46c67a554a90829c5b65b26f0168c67 (diff)
Improve readability and move custom matchers to better place
Diffstat (limited to 'lib/gitlab/auth')
-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!