diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-04-12 01:26:01 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-04-12 02:01:51 +0300 |
commit | 61fc9aa87ea3752f3c7b853ab1cb102e53d392f2 (patch) | |
tree | 1763826e6f39fc64d3a31e6cebfb1ec8214a42e2 /lib | |
parent | 31bcd9f8793d972bd59fc75c686ab03974a1d631 (diff) |
Better control flow.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/o_auth/user.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb index 6e099c26d8c..356e96fcbab 100644 --- a/lib/gitlab/o_auth/user.rb +++ b/lib/gitlab/o_auth/user.rb @@ -54,12 +54,10 @@ module Gitlab @user ||= build_new_user end - unless @user.nil? - if external_provider? - @user.external = true - else - @user.external = false - end + if external_provider? && @user + @user.external = true + elsif @user + @user.external = false end @user |