From cb17de44fc37a031883ac85d7405d56b797dcb5d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Jul 2017 22:10:44 +0200 Subject: [PATCH 1/2] 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 423313670..ceec06ed5 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -967,10 +967,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 983d5ca49..9d2dee1cc 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -1245,10 +1245,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; From c0d514eb4fa2c1cc9ef2436398d8e6be105ecf7b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 28 Jul 2017 10:30:10 +0200 Subject: [PATCH 2/2] add entry for 5.1.3 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 2e89b8c6a..089bbc00c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ - fix output of validation errors in attribute mgr - check if user has access on document and is not disabled if set as reviewer, approver +- notifications are only send to none disabled users - merged changes from 5.0.13 --------------------------------------------------------------------------------