add parameter $incdisabled to SeedDMS_Core_Folder::getNotifyList()

This commit is contained in:
Uwe Steinmann 2021-02-05 13:25:46 +01:00
parent 8543d62ce4
commit 03ef93df2c
2 changed files with 4 additions and 2 deletions

View File

@ -1541,10 +1541,11 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
* notification for the folder
*
* @param integer $type type of notification (not yet used)
* @param bool $incdisabled set to true if disabled user shall be included
* @return SeedDMS_Core_User[]|SeedDMS_Core_Group[]|bool array with a the elements 'users' and 'groups' which
* contain a list of users and groups.
*/
function getNotifyList($type=0) { /* {{{ */
function getNotifyList($type=0, $incdisabled=false) { /* {{{ */
if (empty($this->_notifyList)) {
$db = $this->_dms->getDB();
@ -1558,7 +1559,7 @@ class SeedDMS_Core_Folder 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

@ -28,6 +28,7 @@
- add SeedDMS_Core_User->isType() and SeedDMS_Core_Group->isType()
- add SeedDMS_Core_User->getDMS() and SeedDMS_Core_Group->getDMS()
- add new parameter to SeedDMS_Core_DMS->getDocumentList() for skipping expired documents
- add parameter $incdisabled to SeedDMS_Core_Folder::getNotifyList()
</notes>
<contents>
<dir baseinstalldir="SeedDMS" name="/">