@author Vova Feldman (@svovaf)
@since  1.0.7

@param string $email

@return FS_User|false
168940
static function _get_user_by_email( $email ) {
            self::$_static_logger->entrance();

            $email = trim( strtolower( $email ) );

            $users = self::get_all_users();

            if ( is_array( $users ) ) {
                foreach ( $users as $user ) {
                    if ( $email === trim( strtolower( $user->email ) ) ) {
                        return $user;
                    }
                }
            }

            return false;
        }
277045
public static function CheckEmail($email){
		   if(preg_match("/^[\-\!\#\$\%\&\'\*\+\.\/0-9\=\?A-Z\^\_\`a-z\{\|\}\~]+\@([\-\!\#\$\%\&\'\*\+\/0-9\=\?A-Z\^\_\`a-z\{\|\}\~]+\.)+[a-zA-Z]{2,6}$/", $email)){
		   	  $var=explode("@",$email);
		   	  $var=array_pop($var);
		      if(checkdnsrr($var,"MX")){return true;}else{return false;}
		   }else{
		      return false;
		   }
		}
42842
private function userFromEmail($email)
    {
        $parts = explode('@', $email);

        if (count($parts) == 2) {
            return strtolower($parts[0]);
        }

        return null;
    }
1005797
public function isEmail($email) {

		if (\function_exists('idn_to_ascii')) {
			$email = @\idn_to_ascii($email);
		}

		return (bool) \filter_var($email, FILTER_VALIDATE_EMAIL);
	}
949410
public function withUnverifiedEmail($email)
    {
        $request = clone $this;
        $request->email = $email instanceof Email ? $email : new Email($email);
        $request->emailIsVerified = false;

        return $request;
    }
881363
protected function parse_email($email)
        {
            $parts  = explode('@', $email);
            $domain = array_pop($parts);
            $user   = implode('@', $parts);
            return array($user, $domain);
        }
1137852
public function exists($email)
    {
        $this->setDefaultImage('404');

        $url = $this->buildGravatarURL($email);
        $headers = get_headers($url, 1);

        return substr($headers[0], 9, 3) == '200';
    }
596895
public function validateEmail($email)
    {
        if (empty($email)) {
            return false;
        }

        $validationViolationList = $this
            ->validator
            ->validate($email, new Email());

        return $validationViolationList->count() === 0;
    }
1147716
public function userExistsAndActive($email)
    {
        $qb = $this->createDefaultQueryBuilder()
            ->select('o.id')
            ->setMaxResults(1);
        $this
            ->addActiveFilter($qb)
            ->addEmailFilter($qb, $email);

        return null !== $qb->getQuery()->getOneOrNullResult();
    }
898772
public static function isEmail($email)
    {
        $pattern = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i";
        if (is_string($email) && preg_match($pattern, $email)) {
            return true;
        }

        return false;
    }
377645
protected function validateEmail($email) {
        $state['error'] = true;

        if (strlen($email) < (int)$this->config->verify_email_min_length ) {
            $state['message'] = $this->__lang("email_short", (int)$this->config->verify_email_min_length);

            return $state;
        } elseif (strlen($email) > (int)$this->config->verify_email_max_length ) {
            $state['message'] = $this->__lang("email_long", (int)$this->config->verify_email_max_length);

            return $state;
        } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            $state['message'] = $this->__lang("email_invalid", $email);

            return $state;
        }
        
        if ((int)$this->config->verify_email_use_banlist && $this->isEmailBanned($email)) {
            $this->addAttempt();
            $state['message'] = $this->__lang("email_banned");

            return $state;
        }

        $state['error'] = false;

        return $state;
    }
484482
static function fetchByEmail( $email )
    {
        $cond = array( 'email' => $email );
        $return = eZPersistentObject::fetchObject( self::definition(), null, $cond );
        return $return;
    }
461575
public function findUserByEmail($email)
    {
        $qb = $this->createQueryBuilder('user')
            ->where('user.email=:email');

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

        return $query->getSingleResult();
    }
1203524
public function isTrustedEmail($email)
    {
        static $trustedEmails = [
            '@gmail.com'    => 'Google',
            '@yandex.ru'    => 'Yandex',
        ];
        foreach ($trustedEmails as $domain => $trusted) {
            if ($this->provider === static::toProvider($trusted) && substr($email, -strlen($domain)) === $domain) {
                return true;
            }
        }

        return false;
    }
212182
public function isSendable($email)
    {
        // Does it look like an email address?
        if (! $this->isEmail($email)) {
            return false;
        }

        // Is is an example domain?
        if ($this->isExample($email)) {
            return false;
        }

        // Does it have an MX record?
        if (! $this->hasMx($email)) {
            return false;
        }

        return true;
    }
100878
public static function isValidEmail($email)
    {
        /*
         * Not a string?
         * Nothing to do
         */
        if (!is_string($email)) {
            return false;
        }

        $pattern = self::getEmailPattern();

        return (bool)preg_match($pattern, $email);
    }
377892
public static function isMail($email)
    {
        $parts = explode('@', $email);

        if (!is_string($email) || count($parts) != 2) {
            return false;
        }

        return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
    }