core-bundle/src/Resources/contao/models/MemberModel.php
public static function findUnactivatedByEmail($strEmail, array $arrOptions=array())
	{
		$t = static::$strTable;
		$objDatabase = Database::getInstance();

		$objResult = $objDatabase->prepare("SELECT * FROM $t WHERE email=? AND disable='1' AND EXISTS (SELECT * FROM tl_opt_in_related r LEFT JOIN tl_opt_in o ON r.pid=o.id WHERE r.relTable='$t' AND r.relId=$t.id AND o.createdOn>? AND o.confirmedOn=0)")
								 ->limit(1)
								 ->execute($strEmail, strtotime('-24 hours'));

		if ($objResult->numRows < 1)
		{
			return null;
		}

		$objRegistry = Registry::getInstance();

		/** @var MemberModel|Model $objMember */
		if ($objMember = $objRegistry->fetch($t, $objResult->id))
		{
			return $objMember;
		}

		return new static($objResult);
	}
public static function findUnactivatedByEmail($strEmail, array $arrOptions=array())
	{
		$t = static::$strTable;
		$objDatabase = Database::getInstance();

		$objResult = $objDatabase->prepare("SELECT * FROM $t WHERE email=? AND disable='1' AND EXISTS (SELECT * FROM tl_opt_in_related r LEFT JOIN tl_opt_in o ON r.pid=o.id WHERE r.relTable='$t' AND r.relId=$t.id AND o.createdOn>? AND o.confirmedOn=0)")
								 ->limit(1)
								 ->execute($strEmail, strtotime('-24 hours'));

		if ($objResult->numRows < 1)
		{
			return null;
		}

		$objRegistry = Registry::getInstance();

		/** @var MemberModel|Model $objMember */
		if ($objMember = $objRegistry->fetch($t, $objResult->id))
		{
			return $objMember;
		}

		return new static($objResult);
	}
public static function findUnactivatedByEmail ( $ strEmail , array $ arrOptions = array ( ) ) { $ t = static :: $ strTable ; $ objDatabase = Database :: getInstance ( ) ; $ objResult = $ objDatabase -> prepare ( "SELECT * FROM $t WHERE email=? AND disable='1' AND EXISTS (SELECT * FROM tl_opt_in_related r LEFT JOIN tl_opt_in o ON r.pid=o.id WHERE r.relTable='$t' AND r.relId=$t.id AND o.createdOn>? AND o.confirmedOn=0)" ) -> limit ( 1 ) -> execute ( $ strEmail , strtotime ( '-24 hours' ) ) ; if ( $ objResult -> numRows < 1 ) { return null ; } $ objRegistry = Registry :: getInstance ( ) ; /** @var MemberModel|Model $objMember */ if ( $ objMember = $ objRegistry -> fetch ( $ t , $ objResult -> id ) ) { return $ objMember ; } return new static ( $ objResult ) ; }
Find an unactivated member with a valid opt-in token by their e-mail-address

@param string $strEmail   The e-mail address
@param array  $arrOptions An optional options array

@return static The model or null if there is no member
Find an unactivated member with a valid opt - in token by their e - mail - address