use new method SeedDMS_Core_User->isType()

This commit is contained in:
Uwe Steinmann 2021-01-29 10:33:35 +01:00
parent 8aa7662f31
commit ae2eebd562

View File

@ -84,7 +84,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
* @return false or -1 in case of error, otherwise true
*/
function toIndividual($sender, $recipient, $subject, $messagekey, $params=array(), $attachments=array()) { /* {{{ */
if(is_object($recipient) && !strcasecmp(get_class($recipient), $this->_dms->getClassname('user')) && !$recipient->isDisabled() && $recipient->getEmail()!="") {
if(is_object($recipient) && $recipient->isType('user') && !$recipient->isDisabled() && $recipient->getEmail()!="") {
$to = $recipient->getEmail();
$lang = $recipient->getLanguage();
} elseif(is_string($recipient) && trim($recipient) != "") {