diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-04-11 17:26:01 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-04-11 18:01:51 -0500 |
commit | 61fc9aa87ea3752f3c7b853ab1cb102e53d392f2 (patch) | |
tree | 1763826e6f39fc64d3a31e6cebfb1ec8214a42e2 | |
parent | 31bcd9f8793d972bd59fc75c686ab03974a1d631 (diff) | |
download | gitlab-ce-external-omniauth-providers.tar.gz |
Better control flow.external-omniauth-providers
-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 |