Changeset 381 for trunk/expressoMail1_2/inc/class.ldap_functions.inc.php
- Timestamp:
- 07/30/08 16:54:18 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.ldap_functions.inc.php
r371 r381 150 150 $return = array(); 151 151 $return['status'] = false; 152 $return['error'] = "many results"; 152 $return['error'] = "many results"; 153 153 return $return; 154 154 } … … 393 393 $error = False; 394 394 395 $this->ldapConnect( false,$catalog);395 $this->ldapConnect(true,$catalog); 396 396 397 397 $params['organization'] == 'all' ? $user_context = $this->ldap_context :$user_context = $this->branch."=".$params['organization'].",".$this->ldap_context; … … 410 410 } 411 411 412 $sr=@ldap_search($this->ds, $user_context, $filter, $justthese, 0, $ this->max_result+1);412 $sr=@ldap_search($this->ds, $user_context, $filter, $justthese, 0, $max_result+1); 413 413 if(!$sr) 414 414 return null; 415 415 $count_entries = ldap_count_entries($this->ds,$sr); 416 if ($count_entries > $ this->max_result){416 if ($count_entries > $max_result){ 417 417 $info = null; 418 $error = True; 418 $error = True; 419 419 } 420 420 else … … 430 430 //aqui eh feita a concatenacao do departamento ao cn; 431 431 $u_tmp[$info[$i]["mail"][0]] = utf8_decode($info[$i]["cn"][0]). '%' . $info[$i]["ou"][0]; 432 else432 if((!$catalog==0)||(strtoupper($info[$i]["phpgwaccounttype"][0]) == 'L') && ($info[$i]["phpgwaccountvisible"][0] != '-1')) 433 433 $g_tmp[$info[$i]["mail"][0]] = utf8_decode($info[$i]["cn"][0]); 434 434 } … … 655 655 656 656 if($entry) { 657 $obj = array("cn" => utf8_decode( ldap_get_values($ds, $entry, "cn")),657 $obj = array("cn" => utf8_decode(current(ldap_get_values($ds, $entry, "cn"))), 658 658 "email" => $params['email'], 659 659 "uid" => ldap_get_values($ds, $entry, "uid"),
Note: See TracChangeset
for help on using the changeset viewer.