Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthController.php
Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | protected function loadAccountForRegistrationOrLinking($account_key) { | ||||
if ($other_account) { | if ($other_account) { | ||||
$response = $this->renderError( | $response = $this->renderError( | ||||
pht( | pht( | ||||
'The account you are attempting to register with already belongs '. | 'The account you are attempting to register with already belongs '. | ||||
'to another user.')); | 'to another user.')); | ||||
return array($account, $provider, $response); | return array($account, $provider, $response); | ||||
} | } | ||||
$provider = PhabricatorAuthProvider::getEnabledProviderByKey( | $config = $account->getProviderConfig(); | ||||
$account->getProviderKey()); | if (!$config->getIsEnabled()) { | ||||
if (!$provider) { | |||||
$response = $this->renderError( | $response = $this->renderError( | ||||
pht( | pht( | ||||
'The account you are attempting to register with uses a nonexistent '. | 'The account you are attempting to register with uses a disabled '. | ||||
'or disabled authentication provider (with key "%s"). An '. | 'authentication provider ("%s"). An administrator may have '. | ||||
'administrator may have recently disabled this provider.', | 'recently disabled this provider.', | ||||
$account->getProviderKey())); | $config->getDisplayName())); | ||||
return array($account, $provider, $response); | return array($account, $provider, $response); | ||||
} | } | ||||
$provider = $config->getProvider(); | |||||
return array($account, $provider, null); | return array($account, $provider, null); | ||||
} | } | ||||
protected function loadInvite() { | protected function loadInvite() { | ||||
$invite_cookie = PhabricatorCookies::COOKIE_INVITE; | $invite_cookie = PhabricatorCookies::COOKIE_INVITE; | ||||
$invite_code = $this->getRequest()->getCookie($invite_cookie); | $invite_code = $this->getRequest()->getCookie($invite_cookie); | ||||
if (!$invite_code) { | if (!$invite_code) { | ||||
return null; | return null; | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |