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:
authorDouwe Maan <douwe@selenight.nl>2017-02-22 21:43:48 +0300
committerDouwe Maan <douwe@selenight.nl>2017-02-23 18:32:42 +0300
commitba0d27fe940fc120774c331492a849684ff1f9ad (patch)
tree10e5b84b1eabe8f1fae6c85ef2502e65f8c73443 /lib/gitlab/o_auth
parentec5a74ecfa4cf5f8a6b3b66526d614d71b192105 (diff)
Update rubocop and rubocop-rspec and regenerate .rubocop_todo.yml
Diffstat (limited to 'lib/gitlab/o_auth')
-rw-r--r--lib/gitlab/o_auth/user.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb
index 96ed20af918..87af76cc122 100644
--- a/lib/gitlab/o_auth/user.rb
+++ b/lib/gitlab/o_auth/user.rb
@@ -29,12 +29,9 @@ module Gitlab
def save(provider = 'OAuth')
unauthorized_to_create unless gl_user
- if needs_blocking?
- gl_user.save!
- gl_user.block
- else
- gl_user.save!
- end
+ gl_user.save!
+
+ gl_user.block if needs_blocking?
log.info "(#{provider}) saving user #{auth_hash.email} from login with extern_uid => #{auth_hash.uid}"
gl_user