Changeset 11 for trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
- Timestamp:
- 03/30/07 18:29:24 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
r9 r11 637 637 } 638 638 639 function group_exist($gidnumber) 640 { 641 $justthese = array("cn"); 642 $filter="(&(phpgwAccountType=g)(gidNumber=".$gidnumber."))"; 643 $search = ldap_search($this->ldap, $GLOBALS['phpgw_info']['server']['ldap_context'], $filter, $justthese); 644 645 $entry = ldap_get_entries($this->ldap, $search); 646 if ($entry['count'] == 0) 647 return false; 648 else 649 return true; 650 } 651 639 652 function gidnumbers2cn($gidnumbers, $context) 640 653 { … … 649 662 650 663 $entry = ldap_get_entries($this->ldap, $search); 651 $result['groups_info'][$i]['cn'] = $entry[0]['cn'][0]; 664 if ($entry['count'] == 0) 665 $result['groups_info'][$i]['cn'] = '_Grupo existe no BD mas não no LDAP'; 666 else 667 $result['groups_info'][$i]['cn'] = $entry[0]['cn'][0]; 652 668 $result['groups_info'][$i]['gidnumber'] = $gidnumber; 653 669
Note: See TracChangeset
for help on using the changeset viewer.