Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthLoginController.php
Show First 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | return $this->renderErrorPage( | ||||
array($message)); | array($message)); | ||||
} | } | ||||
public function buildProviderPageResponse( | public function buildProviderPageResponse( | ||||
PhabricatorAuthProvider $provider, | PhabricatorAuthProvider $provider, | ||||
$content) { | $content) { | ||||
$crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
$viewer = $this->getViewer(); | |||||
if ($this->getRequest()->getUser()->isLoggedIn()) { | if ($viewer->isLoggedIn()) { | ||||
$crumbs->addTextCrumb(pht('Link Account'), $provider->getSettingsURI()); | $crumbs->addTextCrumb(pht('Link Account'), $provider->getSettingsURI()); | ||||
} else { | } else { | ||||
$crumbs->addTextCrumb(pht('Log In'), $this->getApplicationURI('start/')); | $crumbs->addTextCrumb(pht('Login'), $this->getApplicationURI('start/')); | ||||
$content = array( | |||||
$this->newCustomStartMessage(), | |||||
$content, | |||||
); | |||||
} | } | ||||
$crumbs->addTextCrumb($provider->getProviderName()); | $crumbs->addTextCrumb($provider->getProviderName()); | ||||
$crumbs->setBorder(true); | $crumbs->setBorder(true); | ||||
return $this->newPage() | return $this->newPage() | ||||
->setTitle(pht('Log In')) | ->setTitle(pht('Login')) | ||||
->setCrumbs($crumbs) | ->setCrumbs($crumbs) | ||||
->appendChild($content); | ->appendChild($content); | ||||
} | } | ||||
public function buildProviderErrorResponse( | public function buildProviderErrorResponse( | ||||
PhabricatorAuthProvider $provider, | PhabricatorAuthProvider $provider, | ||||
$message) { | $message) { | ||||
$message = pht( | $message = pht( | ||||
'Authentication provider ("%s") encountered an error while attempting '. | 'Authentication provider ("%s") encountered an error while attempting '. | ||||
'to log in. %s', $provider->getProviderName(), $message); | 'to log in. %s', $provider->getProviderName(), $message); | ||||
return $this->renderError($message); | return $this->renderError($message); | ||||
} | } | ||||
} | } |