getNotifyList() can also return disable user

This commit is contained in:
Uwe Steinmann 2018-06-20 20:41:16 +02:00
parent 2d27a491c3
commit 535a91db7e
2 changed files with 4 additions and 2 deletions

View File

@ -1116,9 +1116,10 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
* SeedDMS_Core_Group.
*
* @param integer $type type of notification (not yet used)
* @param bool $incdisabled set to true if disabled user shall be included
* @return array|bool
*/
function getNotifyList($type=0) { /* {{{ */
function getNotifyList($type=0, $incdisabled=false) { /* {{{ */
if (empty($this->_notifyList)) {
$db = $this->_dms->getDB();
@ -1132,7 +1133,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
{
if ($row["userID"] != -1) {
$u = $this->_dms->getUser($row["userID"]);
if($u && !$u->isDisabled())
if($u && (!$u->isDisabled() || $incdisabled))
array_push($this->_notifyList["users"], $u);
} else { //if ($row["groupID"] != -1)
$g = $this->_dms->getGroup($row["groupID"]);

View File

@ -26,6 +26,7 @@
<notes>
SeedDMS_Core_DMS::search() returns false in case of an error
do not use views in DBAccessPDO by default anymore, use temp. tables
SeedDMS_Core_Document::getNotifyList() has new parameter to include disabled user in list
</notes>
<contents>
<dir baseinstalldir="SeedDMS" name="/">