public hasSignature ( boolean $compose_page = false ) : boolean | ||
$compose_page | boolean | If true, checks for signatures as used on the compose pages. |
Résultat | boolean | True if the user has at least one signature. |
public function hasSignature($compose_page = false)
{
global $prefs;
if (!$compose_page || $prefs->getValue('signature_show_compose')) {
foreach (array_keys($this->_identities) as $key) {
if (strlen(trim($this->getValue('signature_html', $key))) || strlen(trim($this->getValue('signature', $key)))) {
return true;
}
}
}
return false;
}