- Timestamp:
- 11/23/10 15:22:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php
r3388 r3530 405 405 $info = ldap_get_entries($this->ds, $sr); 406 406 407 if($info["count"] == 0) 408 { 409 $organizations[0]['ou'] = $this->ldap_context; 410 } 411 407 412 for ($i=0; $i<$info["count"]; $i++) 408 413 $organizations[$i] = $info[$i]["ou"][0]; … … 420 425 $this->ldapRootConnect($referral); 421 426 if ($this->ds) { 422 $filter="(&(o u=*)(!(phpgwAccountVisible=-1)))";427 $filter="(&(objectClass=organizationalUnit)(!(phpgwAccountVisible=-1)))"; 423 428 $justthese = array("ou"); 424 429 $sr = ldap_list($this->ds, $this->ldap_context, $filter, $justthese); 425 430 $info = ldap_get_entries($this->ds, $sr); 426 431 427 for ($i=0; $i<$info["count"]; $i++) 428 { 429 $organizations[$i]['ou'] = $info[$i]["ou"][0]; 430 $organizations[$i]['dn'] = $info[$i]["dn"]; 431 } 432 432 433 if($info["count"] == 0) 434 { 435 $organizations[0]['ou'] = $this->ldap_context; 436 $organizations[0]['dn'] = $this->ldap_context; 437 } 438 else{ 439 for ($i=0; $i<$info["count"]; $i++) 440 { 441 $organizations[$i]['ou'] = $info[$i]["ou"][0]; 442 $organizations[$i]['dn'] = $info[$i]["dn"]; 443 } 444 } 433 445 ldap_close($this->ds); 434 446 sort($organizations);
Note: See TracChangeset
for help on using the changeset viewer.