Changeset 3060 for sandbox/workflow/trunk/inc/class.WorkflowLDAP.inc.php
- Timestamp:
- 07/15/10 17:30:07 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/trunk/inc/class.WorkflowLDAP.inc.php
r2372 r3060 377 377 * @access public 378 378 */ 379 function getUsers($context) 380 { 381 $filter = '(&(phpgwaccounttype=u)(!(phpgwAccountVisible=-1)))'; 379 function getUsers($context, $onlyVisibleAccounts = true) 380 { 381 $filter = '(phpgwaccounttype=u)'; 382 if($onlyVisibleAccounts) 383 $filter = '(&' . $filter . '(!(phpgwAccountVisible=-1)))'; 384 382 385 $elements = array('uidnumber', 'cn', 'mail'); 383 386 return $this->getEntities($context, $filter, $elements, 'u', false); … … 561 564 * @access public 562 565 */ 563 function search($searchTerm, $includeUsers = true, $includeGroups = false, $includeLists = false, $context = null )566 function search($searchTerm, $includeUsers = true, $includeGroups = false, $includeLists = false, $context = null, $onlyVisibleAccounts = true) 564 567 { 565 568 if (!($includeUsers || $includeGroups || $includeLists)) … … 586 589 $entityFilter = $entityFilter[0]; 587 590 588 $filter = "(&{$entityFilter}(cn={$searchTerm})(!(phpgwAccountVisible=-1)))"; 591 if($onlyVisibleAccounts) 592 $filter = "(&{$entityFilter}(cn={$searchTerm})(!(phpgwAccountVisible=-1)))"; 593 else 594 $filter = "(&{$entityFilter}(cn={$searchTerm}))"; 595 589 596 $resourceIdentifier = ldap_search($this->dataSource, $context, $filter, array('cn', 'uidnumber', 'gidnumber', 'phpgwaccounttype', 'mail')); 590 597 ldap_sort($this->dataSource, $resourceIdentifier, 'cn');
Note: See TracChangeset
for help on using the changeset viewer.