IMP_Prefs_Identity::hasAddress PHP Méthode

hasAddress() public méthode

This function will search aliases for an identity automatically.
public hasAddress ( mixed $address ) : boolean
$address mixed The address(es) to search for in the identities.
Résultat boolean True if the address was found.
    public function hasAddress($address)
    {
        $from_addr = $this->getAllFromAddresses();
        foreach (IMP::parseAddressList($address)->bare_addresses as $val) {
            if ($from_addr->contains($val)) {
                return true;
            }
        }
        return false;
    }