From 29bc0c1fda335b75eebd3374d7916c3ee8c7ec56 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Jul 2017 22:10:44 +0200 Subject: [PATCH] getNotifyList() returns only users which are not disabled --- SeedDMS_Core/Core/inc.ClassDocument.php | 13 +++++++++---- SeedDMS_Core/Core/inc.ClassFolder.php | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index a6db83983..efb8af4da 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1329,10 +1329,15 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $this->_notifyList = array("groups" => array(), "users" => array()); foreach ($resArr as $row) { - if ($row["userID"] != -1) - array_push($this->_notifyList["users"], $this->_dms->getUser($row["userID"]) ); - else //if ($row["groupID"] != -1) - array_push($this->_notifyList["groups"], $this->_dms->getGroup($row["groupID"]) ); + if ($row["userID"] != -1) { + $u = $this->_dms->getUser($row["userID"]); + if($u && !$u->isDisabled()) + array_push($this->_notifyList["users"], $u); + } else { //if ($row["groupID"] != -1) + $g = $this->_dms->getGroup($row["groupID"]); + if($g) + array_push($this->_notifyList["groups"], $g); + } } } return $this->_notifyList; diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index c1d7b9130..bdae11412 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -1251,10 +1251,15 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { $this->_notifyList = array("groups" => array(), "users" => array()); foreach ($resArr as $row) { - if ($row["userID"] != -1) - array_push($this->_notifyList["users"], $this->_dms->getUser($row["userID"]) ); - else //if ($row["groupID"] != -1) - array_push($this->_notifyList["groups"], $this->_dms->getGroup($row["groupID"]) ); + if ($row["userID"] != -1) { + $u = $this->_dms->getUser($row["userID"]); + if($u && !$u->isDisabled()) + array_push($this->_notifyList["users"], $u); + } else {//if ($row["groupID"] != -1) + $g = $this->_dms->getGroup($row["groupID"]); + if($g) + array_push($this->_notifyList["groups"], $g); + } } } return $this->_notifyList;