FOS\UserBundle\Model\UserManagerInterface::findUserByEmail PHP Method

findUserByEmail() public method

Find a user by its email
public findUserByEmail ( string $email ) : User
$email string
return User or null if user does not exist
    function findUserByEmail($email);

Usage Example

 /**
  * @param string $email
  * @param string $pw
  * @return \FOS\UserBundle\Model\UserInterface|null
  */
 function getUserByEmailPw($email, $pw)
 {
     $result = null;
     if ($email && $pw) {
         $user = $this->_fosUserManager->findUserByEmail($email);
         if ($user && $this->isPasswordValid($user, $pw)) {
             $result = $user;
         }
     }
     return $result;
 }
All Usage Examples Of FOS\UserBundle\Model\UserManagerInterface::findUserByEmail