src/Sulu/Bundle/SecurityBundle/Entity/UserRepository.php
public function findUserByEmail($email)
    {
        $qb = $this->createQueryBuilder('user')
            ->where('user.email=:email');

        $query = $qb->getQuery();
        $query->setParameter('email', $email);

        return $query->getSingleResult();
    }
public function findUserByEmail($email)
    {
        $qb = $this->createQueryBuilder('user')
            ->where('user.email=:email');

        $query = $qb->getQuery();
        $query->setParameter('email', $email);

        return $query->getSingleResult();
    }
public function findUserByEmail ( $ email ) { $ qb = $ this -> createQueryBuilder ( 'user' ) -> where ( 'user.email=:email' ) ; $ query = $ qb -> getQuery ( ) ; $ query -> setParameter ( 'email' , $ email ) ; return $ query -> getSingleResult ( ) ; }
Finds a user for a given email.

@param string $email The email-address

@return UserInterface

@throws NoResultException if the user is not found
Finds a user for a given email .