Eccube\Repository\CustomerRepository::loadUserByUsername PHP Метод

loadUserByUsername() публичный Метод

This method must throw UsernameNotFoundException if the user is not found.
См. также: UsernameNotFoundException
public loadUserByUsername ( string $username ) : Symfony\Component\Security\Core\User\UserInterface
$username string The username
Результат Symfony\Component\Security\Core\User\UserInterface
    public function loadUserByUsername($username)
    {
        // 本会員ステータスの会員のみ有効.
        $CustomerStatus = $this->getEntityManager()->getRepository('Eccube\\Entity\\Master\\CustomerStatus')->find(CustomerStatus::ACTIVE);
        $query = $this->createQueryBuilder('c')->where('c.email = :email')->andWhere('c.del_flg = :delFlg')->andWhere('c.Status =:CustomerStatus')->setParameters(array('email' => $username, 'delFlg' => Constant::DISABLED, 'CustomerStatus' => $CustomerStatus))->setMaxResults(1)->getQuery();
        $Customer = $query->getOneOrNullResult();
        if (!$Customer) {
            throw new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username));
        }
        return $Customer;
    }