module/Application/src/Application/Repository/User.php
/**
     * find user by email address - used primarily for oAuth2
     * @param type $email
     * @param array $params
     * @return Application\Entity\User
     */
find user by email address - used primarily for oAuth2
@param type $email
@param array $params
@return Application\Entity\User
find user by email address - used primarily for oAuth2 @param type $email @param array $params @return Application \ Entity \ User
public function findByEmail($email, array $params=array()) {
        $queryBuilder = $this->_em->createQueryBuilder();
        $queryBuilder
            ->select('u')
            ->from('Application\Entity\User', 'u')
            ->where('u.email=\''.$email.'\'')
                ;
        $query  = $queryBuilder->getQuery();
        return $query->getSingleResult();
    }
public function findByEmail ( $ email , array $ params = array ( ) ) { $ queryBuilder = $ this -> _em -> createQueryBuilder ( ) ; $ queryBuilder -> select ( 'u' ) -> from ( 'Application\Entity\User' , 'u' ) -> where ( 'u.email=\'' . $ email . '\'' ) ; $ query = $ queryBuilder -> getQuery ( ) ; return $ query -> getSingleResult ( ) ; }
find user by email address - used primarily for oAuth2
 @param type $email
 @param array $params
 @return Application\Entity\User
find user by email address - used primarily for oAuth2 @param type $email @param array $params @return Application \ Entity \ User