eZ\Publish\Core\Repository\UserService::buildDomainUserObject PHP Method

buildDomainUserObject() protected method

Builds the domain user object from provided persistence user object.
protected buildDomainUserObject ( eZ\Publish\SPI\Persistence\User $spiUser, eZ\Publish\API\Repository\Values\Content\Content $content = null ) : eZ\Publish\API\Repository\Values\User\User
$spiUser eZ\Publish\SPI\Persistence\User
$content eZ\Publish\API\Repository\Values\Content\Content
return eZ\Publish\API\Repository\Values\User\User
    protected function buildDomainUserObject(SPIUser $spiUser, APIContent $content = null)
    {
        if ($content === null) {
            $content = $this->repository->getContentService()->internalLoadContent($spiUser->id);
        }
        return new User(array('content' => $content, 'login' => $spiUser->login, 'email' => $spiUser->email, 'passwordHash' => $spiUser->passwordHash, 'hashAlgorithm' => (int) $spiUser->hashAlgorithm, 'enabled' => $spiUser->isEnabled, 'maxLogin' => (int) $spiUser->maxLogin));
    }