protected function loadAPIUser(SyliusUserInterface $user)
    {
        $eZSyliusUser = $this->eZUserRepository->findOneBy(
            array(
                'syliusUserId' => $user->getId(),
                'syliusUserType' => $this->syliusUserType,
            )
        );

        if (!$eZSyliusUser instanceof EzSyliusUser) {
            return null;
        }

        try {
            return $this->repository->getUserService()->loadUser(
                $eZSyliusUser->getEzUserId()
            );
        } catch (NotFoundException $e) {
            return null;
        }
    }
protected function loadAPIUser(SyliusUserInterface $user)
    {
        $eZSyliusUser = $this->eZUserRepository->findOneBy(
            array(
                'syliusUserId' => $user->getId(),
                'syliusUserType' => $this->syliusUserType,
            )
        );

        if (!$eZSyliusUser instanceof EzSyliusUser) {
            return null;
        }

        try {
            return $this->repository->getUserService()->loadUser(
                $eZSyliusUser->getEzUserId()
            );
        } catch (NotFoundException $e) {
            return null;
        }
    }
protected function loadAPIUser ( SyliusUserInterface $ user ) { $ eZSyliusUser = $ this -> eZUserRepository -> findOneBy ( array ( 'syliusUserId' => $ user -> getId ( ) , 'syliusUserType' => $ this -> syliusUserType , ) ) ; if ( ! $ eZSyliusUser instanceof EzSyliusUser ) { return null ; } try { return $ this -> repository -> getUserService ( ) -> loadUser ( $ eZSyliusUser -> getEzUserId ( ) ) ; } catch ( NotFoundException $ e ) { return null ; } }
Loads eZ API user based on provided Sylius user.

@param \Sylius\Component\User\Model\UserInterface $user

@return \eZ\Publish\API\Repository\Values\User\User
Loads eZ API user based on provided Sylius user .