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

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

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

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

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

@param string $token the reset-token

@return UserInterface

@throws NoResultException if the user is not found
Finds a user for a given password - reset - token .