Neos\Neos\Controller\LoginController::indexAction PHP Method

indexAction() public method

Default action, displays the login screen
public indexAction ( string $username = null, boolean $unauthorized = false ) : void
$username string Optional: A username to pre-fill into the username field
$unauthorized boolean
return void
    public function indexAction($username = null, $unauthorized = false)
    {
        if ($this->securityContext->getInterceptedRequest() || $unauthorized) {
            $this->response->setStatus(401);
        }
        if ($this->authenticationManager->isAuthenticated()) {
            $this->redirect('index', 'Backend\\Backend');
        }
        $currentDomain = $this->domainRepository->findOneByActiveRequest();
        $currentSite = $currentDomain !== null ? $currentDomain->getSite() : $this->siteRepository->findDefault();
        $this->view->assignMultiple(['styles' => array_filter($this->settings['userInterface']['backendLoginForm']['stylesheets']), 'username' => $username, 'site' => $currentSite]);
    }