Changeset 3167 for branches/2.2/workflow/inc/class.WorkflowLDAP.inc.php
- Timestamp:
- 08/17/10 16:17:12 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/workflow/inc/class.WorkflowLDAP.inc.php
r795 r3167 50 50 function WorkflowLDAP() 51 51 { 52 $this->dataSource = &$GLOBALS['workflow']['workflowObjects']->getLDAP();52 $this->dataSource =& Factory::getInstance('WorkflowObjects')->getLDAP(); 53 53 54 54 /* get the required parameters */ … … 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.