getNotifyList() returns only users which are not disabled

This commit is contained in:
Uwe Steinmann 2017-07-27 22:10:44 +02:00
parent 7576bbf298
commit cb17de44fc
2 changed files with 18 additions and 8 deletions

View File

@ -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;

View File

@ -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;