public function loadUserByAPIUser(User $apiUser)
    {
        $eZSyliusUser = $this->eZUserRepository->findOneBy(
            array(
                'eZUserId' => $apiUser->getUserId(),
                'syliusUserType' => $this->syliusUserType,
            )
        );

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

        return $this->syliusUserRepository->find(
            $eZSyliusUser->getSyliusUserId()
        );
    }
public function loadUserByAPIUser(User $apiUser)
    {
        $eZSyliusUser = $this->eZUserRepository->findOneBy(
            array(
                'eZUserId' => $apiUser->getUserId(),
                'syliusUserType' => $this->syliusUserType,
            )
        );

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

        return $this->syliusUserRepository->find(
            $eZSyliusUser->getSyliusUserId()
        );
    }
public function loadUserByAPIUser ( User $ apiUser ) { $ eZSyliusUser = $ this -> eZUserRepository -> findOneBy ( array ( 'eZUserId' => $ apiUser -> getUserId ( ) , 'syliusUserType' => $ this -> syliusUserType , ) ) ; if ( ! $ eZSyliusUser instanceof EzSyliusUser ) { return null ; } return $ this -> syliusUserRepository -> find ( $ eZSyliusUser -> getSyliusUserId ( ) ) ; }
Loads Sylius user based on provided eZ API user.

@param \eZ\Publish\API\Repository\Values\User\User $apiUser

@return \Sylius\Component\User\Model\UserInterface
Loads Sylius user based on provided eZ API user .