Classes/Controller/RegistrationController.php
public function createAccountAction(Registration $registration)
    {
        $accountIdentifier = $registration->getUsername();
        $existingAccount = $this->accountRepository->findActiveByAccountIdentifierAndAuthenticationProviderName($accountIdentifier, 'Neos.Neos:Backend');
        if ($existingAccount !== null) {
            $this->addFlashMessage('An account with the username "%s" already exists.', 'Account already exists', Message::SEVERITY_ERROR, array($accountIdentifier));
            $this->forward('newAccount');
        }

        $this->createTemporaryAccount($accountIdentifier, $registration->getPassword(), $registration->getFirstName(), $registration->getLastName());

        $uriBuilder = new UriBuilder();
        $uriBuilder->setRequest($this->request->getParentRequest());
        $redirectUri = $uriBuilder
            ->setCreateAbsoluteUri(true)
            ->uriFor('index', array('username' => $accountIdentifier), 'Login', 'Neos.Neos');
        $this->redirectToUri($redirectUri);
    }
public function createAccountAction(Registration $registration)
    {
        $accountIdentifier = $registration->getUsername();
        $existingAccount = $this->accountRepository->findActiveByAccountIdentifierAndAuthenticationProviderName($accountIdentifier, 'Neos.Neos:Backend');
        if ($existingAccount !== null) {
            $this->addFlashMessage('An account with the username "%s" already exists.', 'Account already exists', Message::SEVERITY_ERROR, array($accountIdentifier));
            $this->forward('newAccount');
        }

        $this->createTemporaryAccount($accountIdentifier, $registration->getPassword(), $registration->getFirstName(), $registration->getLastName());

        $uriBuilder = new UriBuilder();
        $uriBuilder->setRequest($this->request->getParentRequest());
        $redirectUri = $uriBuilder
            ->setCreateAbsoluteUri(true)
            ->uriFor('index', array('username' => $accountIdentifier), 'Login', 'Neos.Neos');
        $this->redirectToUri($redirectUri);
    }
public function createAccountAction ( Registration $ registration ) { $ accountIdentifier = $ registration -> getUsername ( ) ; $ existingAccount = $ this -> accountRepository -> findActiveByAccountIdentifierAndAuthenticationProviderName ( $ accountIdentifier , 'Neos.Neos:Backend' ) ; if ( $ existingAccount !== null ) { $ this -> addFlashMessage ( 'An account with the username "%s" already exists.' , 'Account already exists' , Message :: SEVERITY_ERROR , array ( $ accountIdentifier ) ) ; $ this -> forward ( 'newAccount' ) ; } $ this -> createTemporaryAccount ( $ accountIdentifier , $ registration -> getPassword ( ) , $ registration -> getFirstName ( ) , $ registration -> getLastName ( ) ) ; $ uriBuilder = new UriBuilder ( ) ; $ uriBuilder -> setRequest ( $ this -> request -> getParentRequest ( ) ) ; $ redirectUri = $ uriBuilder -> setCreateAbsoluteUri ( true ) -> uriFor ( 'index' , array ( 'username' => $ accountIdentifier ) , 'Login' , 'Neos.Neos' ) ; $ this -> redirectToUri ( $ redirectUri ) ; }
Action for creating a temporary account

@param Registration $registration
@return void
Action for creating a temporary account