@param string $email
@param bool   $just_id TRUE if just want the principal-id of the user

@return  \SimpleXMLElement|int|null
550776
public function getUserByLoginEmail($email, $just_id = false)
    {
        $user = current($this->principalList(array(
            'filter-type' => 'user',
            'filter-login' => $email,
        )));

        if (! $user) {
            return null;
        }

        if ($just_id) {
            return (int) $user->attributes()->{'principal-id'};
        }

        return $user;
    }
354682
public static function email($email)
    {
        $email = Str::trim($email);
        $cleaned = filter_var($email, FILTER_VALIDATE_EMAIL);

        if (Email::isValid($cleaned)) {
            return $cleaned;
        }

        return false;
    }
1030382
public function getContactId($email, $websiteId)
    {
        if (! $this->isEnabled($websiteId)) {
            return false;
        }

        $contactFromTable = $this->getContactByEmail($email, $websiteId);
        if ($contactId = $contactFromTable->getContactId()) {
            return $contactId;
        }

        $contact = $this->getContact($email, $websiteId, $contactFromTable);
        if ($contact && isset($contact->id)) {
            return $contact->id;
        }

        return false;
    }
36368
public function getEmail()
    {
        $primaryAddress = $this->getPrimaryAddress();
        if ($primaryAddress === null) {
            return null;
        }

        $emails = $primaryAddress->getEmails();
        if (empty($emails)) {
            return null;
        }

        foreach ($emails as $email) {
            if (is_array($email) && $email['primary'] === true) {
                return $email['value'];
            }

            return $email->getValue();
        }

        return $emails[0]->getValue();
    }
1301329
static function countContentObjectByEmail( $email, $status = false )
    {
        $statusString = "";
        if ( $status !== false )
        {
            $statusString = " AND status = $status";
        }
        $sql = "SELECT COUNT(*) as row_count FROM " .
               "( SELECT DISTINCT contentobject_id, language_id ".
               " FROM ezcomment " .
               " WHERE email='$email'" .
               "$statusString" .
               ") as contentobject";
        $db = eZDB::instance();
        $result = $db->arrayQuery( $sql );
        return $result[0]['row_count'];
    }
48519
def email_action_view(self, id, action):
        

        # Retrieve UserEmail by id
        user_email = self.db_manager.get_user_email_by_id(id=id)

        # Users may only change their own UserEmails
        if not user_email or user_email.user_id != current_user.id:
            return self.unauthorized_view()

        # Delete UserEmail
        if action == 'delete':
            # Primary UserEmail can not be deleted
            if user_email.is_primary:
                return self.unauthorized_view()
            # Delete UserEmail
            self.db_manager.delete_object(user_email)
            self.db_manager.commit()

        # Set UserEmail.is_primary
        elif action == 'make-primary':
            # Disable previously primary emails
            user_emails = self.db_manager.find_user_emails(current_user)
            for other_user_email in user_emails:
                if other_user_email.is_primary:
                    other_user_email.is_primary=False
                    self.db_manager.save_object(other_user_email)
            # Enable current primary email
            user_email.is_primary=True
            self.db_manager.save_object(user_email)
            self.db_manager.commit()

        # Send confirm email
        elif action == 'confirm':
            self._send_confirm_email_email(user_email.user, user_email)
        else:
            return self.unauthorized_view()

        return redirect(url_for('user.manage_emails'))
460776
protected function getByEmail($email) {
        $users = $this->_client->get('/users?search='.urlencode($email));
        return isset($users[0]) ? $users[0] : false;
    }
979715
public OvhResponderAccount delegatedAccount_email_responder_GET(String email) throws IOException {
		String qPath = "/email/domain/delegatedAccount/{email}/responder";
		StringBuilder sb = path(qPath, email);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhResponderAccount.class);
	}
464224
public static function getByEmail($email)
    {
        $fields = self::getDbConnection()->fetchAssoc('SELECT * FROM '.User::TABLE.' WHERE email = ?', array($email));
        if (!$fields) return false;
        return self::fetch($fields);       
  	}
181106
public function getByEmail ($email)
    {
        $entity = $this->er->findOneBy(array('email' => $email));

        if (NULL == $entity) {
            throw new Exception("User not found: email=$email");
        }

        return $this->getModel($entity);
    }
1334095
static function url( $id, $onlyValid = false )
    {
        $url = false;

        if ( !is_numeric( $id ) )
        {
            return $url;
        }

        $id = (int) $id;
        $db = eZDB::instance();
        $checkURLQuery = "SELECT url, is_valid FROM ezurl WHERE id='$id'";
        $urlArray = $db->arrayQuery( $checkURLQuery );

        if ( count( $urlArray ) == 1 )
        {
            if ( $onlyValid and
                 !$urlArray[0]['is_valid'] )
            {
                 $url = "/url/view/" . $id;
                 return $url;
            }
            $url = $urlArray[0]['url'];
        }
        return $url;
    }
1371647
public function isEmailExists( $email, $excludeId = null )
    {
        return $this->isExists( empty( $excludeId ) ? array(
            'email'     => $email,
            'confirmed' => true,
            new Predicate\Operator(
                'state',
                Predicate\Operator::OP_NE,
                Structure::STATE_INACTIVE
            ),
        ) : array(
            'email' => $email,
            new Predicate\Operator(
                'id',
                Predicate\Operator::OP_NE,
                $excludeId
            ),
        ) );
    }
367791
function email( $order = false )
    {
        if ( $order === false )
            $user = eZUser::currentUser();
        else
            $user = $order->attribute( 'user' );

        if ( is_object( $user ) )
            return $user->attribute( 'email' );
        else
            return null;
    }
733053
public function convertInviteEmails($email, $user_id)
	{
		// @FIXME: Should wrap this up in a nice transaction to handle partial failures and
		// race conditions.

		if (empty($email) || empty($user_id))
		{
			return false;
		}

		$db = \App::get('db');

		$sql = 'SELECT gidNumber FROM `#__xgroups_inviteemails` WHERE email=' . $db->quote($email) . ';';

		$db->setQuery($sql);

		$result = $db->loadColumn();

		if ($result === false)
		{
			return false;
		}

		if (empty($result))
		{
			return true;
		}

		foreach ($result as $r)
		{
			$values .= "($r,$user_id),";
			$gids   .= "$r,";
		}

		$values = rtrim($values, ',');
		$gids = rtrim($gids, ',');

		$sql = 'INSERT INTO `#__xgroups_invitees` (gidNumber,uidNumber) VALUES ' . $values . ';';

		$db->setQuery($sql);

		$result = $db->query();

		if (!$result)
		{
			return false;
		}

		$sql = 'DELETE FROM `#__xgroups_inviteemails` WHERE email=' . $db->quote($email) . ' AND gidNumber IN (' . $gids . ');';

		$db->setQuery($sql);

		$result = $db->query();

		if (!$result)
		{
			return false;
		}

		return true;
	}
449315
public function getUserByEMail(string $email)
    {
        $retval = null;

        if (strlen($email) > 0) {
            $nb_user = CNabuUser::findByEMail($this, $email);
            if ($nb_user instanceof CNabuUser && $nb_user->validateCustomer($this)) {
                $nb_user->setCustomer($this);
                $retval = $nb_user;
            }
        }

        return $retval;
    }
433837
public function findOneByEmailAndWebsiteId($email, $websiteId)
    {

        // initialize the params
        $params = array(
            MemberNames::EMAIL      => $email,
            MemberNames::WEBSITE_ID => $websiteId
        );

        // if not, try to load the customer with the passed email and website ID
        $this->customerByEmailAndWebsiteIdStmt->execute($params);
        return $this->customerByEmailAndWebsiteIdStmt->fetch(\PDO::FETCH_ASSOC);
    }
278859
public static function findByEmail($email, $checkStatus = true)
    {
        return static::findOne(
            $checkStatus ?
                ['email' => $email, 'status' => self::STATUS_ACTIVE] :
                ['email' => $email]
        );
    }