Better control flow.

This commit is contained in:
Patricio Cano 2016-04-11 17:26:01 -05:00
parent 31bcd9f879
commit 61fc9aa87e
1 changed files with 4 additions and 6 deletions

View File

@ -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