Neos.Neos/Classes/Domain/Service/UserService.php
public function createUser($username, $password, $firstName, $lastName, array $roleIdentifiers = null, $authenticationProviderName = null)
    {
        $user = new User();
        $name = new PersonName('', $firstName, '', $lastName, '', $username);
        $user->setName($name);

        return $this->addUser($username, $password, $user, $roleIdentifiers, $authenticationProviderName);
    }
public function createUser($username, $password, $firstName, $lastName, array $roleIdentifiers = null, $authenticationProviderName = null)
    {
        $user = new User();
        $name = new PersonName('', $firstName, '', $lastName, '', $username);
        $user->setName($name);

        return $this->addUser($username, $password, $user, $roleIdentifiers, $authenticationProviderName);
    }
public function createUser ( $ username , $ password , $ firstName , $ lastName , array $ roleIdentifiers = null , $ authenticationProviderName = null ) { $ user = new User ( ) ; $ name = new PersonName ( '' , $ firstName , '' , $ lastName , '' , $ username ) ; $ user -> setName ( $ name ) ; return $ this -> addUser ( $ username , $ password , $ user , $ roleIdentifiers , $ authenticationProviderName ) ; }
Creates a user based on the given information

The created user and account are automatically added to their respective repositories and thus be persisted.

@param string $username The username of the user to be created.
@param string $password Password of the user to be created
@param string $firstName First name of the user to be created
@param string $lastName Last name of the user to be created
@param array $roleIdentifiers A list of role identifiers to assign
@param string $authenticationProviderName Name of the authentication provider to use. Example: "Neos.Neos:Backend"
@return User The created user instance
@api
Creates a user based on the given information