do not send notification emails to disabled users

This commit is contained in:
Uwe Steinmann 2016-02-16 10:35:49 +01:00
parent 78328df952
commit 7e12f18e2b

View File

@ -42,7 +42,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
function toIndividual($sender, $recipient, $subject, $message, $params=array()) { /* {{{ */
global $settings;
if ($recipient->getEmail()=="") return 0;
if ($recipient->isDisabled() || $recipient->getEmail()=="") return 0;
if ((!is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) ||
(!is_object($recipient) && strcasecmp(get_class($recipient), "SeedDMS_Core_User"))) {