- Timestamp:
- 05/19/11 13:38:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/expressoMail1_2/inc/class.ldap_functions.inc.php
r3909 r4457 1 1 <?php 2 require_once($_SESSION['rootPath'].'/API/class.servicelocator.php'); 2 3 include_once("class.imap_functions.inc.php"); 3 4 include_once("class.functions.inc.php"); … … 17 18 var $max_result; 18 19 var $functions; 20 var $ldapService; 21 19 22 function ldap_functions(){ 20 23 // todo: Page Configuration for External Catalogs. 21 24 @include("../contactcenter/setup/external_catalogs.inc.php"); 22 $this->external_srcs= ( isset( $external_srcs ) ) ? $external_srcs : NULL; 23 $this->max_result = 200; 25 $this->ldapService = ServiceLocator::getService('ldap'); 26 $this->external_srcs = $external_srcs; 27 $this->max_result = $this->ldapService->limit; 24 28 $this->functions = new functions(); 25 29 } … … 83 87 include_once("class.functions.inc.php"); 84 88 $functions = new functions; 85 86 $search_for = utf8_encode($params['search_for']); 89 87 90 $field = $params['field']; 88 91 $ID = $params['ID']; 89 90 if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['extended_info']) 91 $extendedinfo=true; 92 else 93 $extendedinfo=false; 94 95 $search_for = explode(" ",$search_for); 96 $aux=""; 97 foreach ($search_for as $search) 98 { 99 if(!$aux) 100 { 101 $aux=$search; 102 } 103 else 104 { 105 if (strlen($search) > 2) 106 { 107 $aux=$aux."*".$search; 108 } 109 else 110 { 111 $aux=$aux." ".$search; 112 } 113 } 114 } 115 $search_for=$aux; 116 92 93 $ldapService = ServiceLocator::getService('ldap'); 94 $filter = $ldapService->getSearchFilter($params['search_for']); 95 117 96 $contacts_result = array(); 118 97 $contacts_result['field'] = $field; 119 98 $contacts_result['ID'] = $ID; 99 $search_for = utf8_encode($params['search_for']); 100 120 101 // follow the referral 121 102 $this->ldapConnect(true); 122 103 123 104 if ($this->ds) 124 { 125 if (($field != 'null') && ($ID != 'null')) 126 { 127 $filter="(& (&(|(phpgwAccountType=u)(phpgwAccountType=g)(phpgwAccountType=l))(mail=*)) (|(cn=*$search_for*)(mail=*$search_for*)) (!(phpgwaccountvisible=-1)) )"; 128 if($extendedinfo) 129 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid", "employeeNumber", "ou"); 130 else 131 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid"); 132 } 133 else 134 { 135 $filter="(& (phpgwAccountType=u)(cn=*$search_for*) (!(phpgwaccountvisible=-1)) )"; 136 if($extendedinfo) 137 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible","jpegPhoto", "uid", "employeeNumber", "ou"); 138 else 139 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible","jpegPhoto", "uid"); 140 } 141 $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result + 1); 142 if(!$sr) 143 return null; 144 $count_entries = ldap_count_entries($this->ds,$sr); 145 146 // Get user org dn. 147 $user_dn = $_SESSION['phpgw_info']['expressomail']['user']['account_dn']; 148 $user_sector_dn = ldap_explode_dn ( $user_dn, false ); 149 array_shift($user_sector_dn); 150 array_shift($user_sector_dn); 151 $user_sector_dn = implode(",", $user_sector_dn); 152 153 // New search only on user sector 154 if ($count_entries > $this->max_result) 155 { 156 // Close old ldap conection 157 ldap_close($this->ds); 158 159 // Reopen a local ldap connection, following referral 160 $this->ldapRootConnect(true); 161 162 $sr= ldap_search($this->ds, $user_sector_dn, $filter, $justthese); 105 { 106 $ldapService->connection = $this->ds; 107 108 $justthese = array("cn", "mail", "telephonenumber", "mobile", "phpgwaccountvisible", "uid", "employeenumber", "ou"); 109 $types = false; 110 111 if( $field == 'null' || $ID == 'null' ) 112 { 113 $justthese[] = "jpegphoto"; 114 $types = 'u'; 115 } 116 117 $filter = $ldapService->getSearchFilter( $params['search_for'], $types ); 118 119 $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result); 120 121 if(!$sr) 122 return null; 123 124 $count_entries = ldap_count_entries($this->ds,$sr); 125 126 $info = ldap_get_entries($this->ds, $sr); 127 128 // New search only on user sector 129 if ($count_entries == $this->max_result) 130 { 131 $overload = $count_entries; 132 } 133 else 134 { 135 $catalogsNum=count($this->external_srcs); 136 for ($i=0; $i<=$catalogsNum; $i++) { 137 if ($this->external_srcs[$i]["quicksearch"]) { 138 $this->ldapConnect(true,$i); 139 $filter="(|(cn=*$search_for*)(mail=*$search_for*))"; 140 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid","employeeNumber", "ou"); 141 $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result+1); 163 142 if(!$sr) 164 143 return null; 165 144 $count_entries = ldap_count_entries($this->ds,$sr); 166 167 if ($count_entries > $this->max_result){ 168 $return = array(); 169 $return['status'] = false; 170 $return['error'] = "many results"; 171 return $return; 145 $search = ldap_get_entries($this->ds, $sr); 146 for ($j=0; $j<$search["count"]; $j++) { 147 $info[] = $search[$j]; 172 148 } 173 else 174 { 175 $quickSearch_only_in_userSector = true; 176 } 177 } 178 179 $info = ldap_get_entries($this->ds, $sr); 180 181 $tmp = array(); 182 $tmp_users_from_user_org = array(); 183 184 if (!$quickSearch_only_in_userSector) { 185 $catalogsNum=count($this->external_srcs); 186 for ($i=0; $i<=count($this->external_srcs); $i++) { 187 if ($this->external_srcs[$i]["quicksearch"]) { 188 $this->ldapConnect(true,$i); 189 $filter="(|(cn=*$search_for*)(mail=*$search_for*))"; 190 if($extendedinfo) 191 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid","employeeNumber", "ou"); 192 else 193 $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid"); 194 $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result+1); 195 if(!$sr) 196 return null; 197 $count_entries = ldap_count_entries($this->ds,$sr); 198 $search = ldap_get_entries($this->ds, $sr); 199 for ($j=0; $j<$search["count"]; $j++) { 200 $info[] = $search[$j]; 201 } 202 $info["count"] = count($info)-1; 203 } 204 } 205 } 206 207 for ($i=0; $i<$info["count"]; $i++) 208 { 209 if ($quickSearch_only_in_userSector) 210 { 211 $tmp[$info[$i]["mail"][0] . '%' . $info[$i]["telephonenumber"][0] . '%'. $info[$i]["mobile"][0] . '%' . $info[$i]["uid"][0] . '%' . $info[$i]["jpegphoto"]['count'] . '%' . $info[$i]["employeenumber"][0] . '%' . $info[$i]["ou"][0]] = utf8_decode($info[$i]["cn"][0]); 212 } 213 else 214 { 215 if (preg_match("/$user_sector_dn/i", $info[$i]['dn'])) 216 { 217 $tmp_users_from_user_org[$info[$i]["mail"][0] . '%' . $info[$i]["telephonenumber"][0] . '%'. $info[$i]["mobile"][0] . '%' . $info[$i]["uid"][0] . '%' . $info[$i]["jpegphoto"]['count'] . '%' . $info[$i]["employeenumber"][0] . '%' . $info[$i]["ou"][0]] = utf8_decode($info[$i]["cn"][0]); 218 } 219 else 220 { 221 $tmp[$info[$i]["mail"][0] . '%' . $info[$i]["telephonenumber"][0] . '%'. $info[$i]["mobile"][0] . '%' . $info[$i]["uid"][0] . '%' . $info[$i]["jpegphoto"]['count'] . '%' . $info[$i]["employeenumber"][0] . '%' . $info[$i]["ou"][0]] = utf8_decode($info[$i]["cn"][0]); 222 } 223 } 224 } 225 natcasesort($tmp_users_from_user_org); 226 natcasesort($tmp); 227 228 if (($field != 'null') && ($ID != 'null')) 229 { 230 $i = 0; 231 232 $tmp = array_merge($tmp, $tmp_users_from_user_org); 233 natcasesort($tmp); 234 235 foreach ($tmp as $info => $cn) 236 { 237 $contacts_result[$i] = array(); 238 $contacts_result[$i]["cn"] = $cn; 239 list ($contacts_result[$i]["mail"], $contacts_result[$i]["phone"], $contacts_result[$i]["mobile"], $contacts_result[$i]["uid"], $contacts_result[$i]["jpegphoto"], $contacts_result[$i]["employeenumber"], $contacts_result[$i]["ou"]) = split ('%', $info); 240 $i++; 241 } 242 $contacts_result['quickSearch_only_in_userSector'] = $quickSearch_only_in_userSector; 243 } 244 else 245 { 246 $options_users_from_user_org = ''; 247 $options = ''; 248 249 /* List of users from user org */ 250 $i = 0; 251 foreach ($tmp_users_from_user_org as $info => $cn) 252 { 253 $contacts_result[$i] = array(); 254 $options_users_from_user_org .= $this->make_quicksearch_card($info, $cn); 255 $i++; 256 } 257 258 /* List of users from others org */ 259 foreach ($tmp as $info => $cn) 260 { 261 $contacts_result[$i] = array(); 262 $options .= $this->make_quicksearch_card($info, $cn); 263 $i++; 264 } 265 266 if ($quickSearch_only_in_userSector) 267 { 268 if ($options != '') 269 { 270 $head_option = 271 '<tr class="quicksearchcontacts_unselected">' . 272 '<td colspan="2" width="100%" align="center">' . 273 str_replace("%1", $this->max_result,$this->functions->getLang('More than %1 results were found')) . '.<br>' . 274 $this->functions->getLang('Showing only the results found in your organization') . '.'; 275 '</td>' . 276 '</tr>'; 277 $contacts_result = $head_option . $options_users_from_user_org . $options; 278 } 279 else 280 { 281 $return = array(); 282 $return['status'] = false; 283 $return['error'] = "many results"; 284 return $return; 285 } 286 } 287 else 288 { 289 if (($options_users_from_user_org != '') && ($options != '')) 290 { 291 $head_option0 = 292 '<tr class="quicksearchcontacts_unselected">' . 293 '<td colspan="2" width="100%" align="center" style="background:#EEEEEE"><B>' . 294 $this->functions->getLang('Users from your organization') . '</B> ['.count($tmp_users_from_user_org).']'; 295 '</td>' . 296 '</tr>'; 297 298 $head_option1 = 299 '<tr class="quicksearchcontacts_unselected">' . 300 '<td colspan="2" width="100%" align="center" style="background:#EEEEEE"><B>' . 301 $this->functions->getLang('Users from others organizations') . '</B> ['.count($tmp).']'; 302 '</td>' . 303 '</tr>'; 304 } 305 $contacts_result = $head_option0 . $options_users_from_user_org . $head_option1 . $options; 306 } 307 } 308 } 309 ldap_close($this->ds); 310 return $contacts_result; 149 $info["count"] = count($info)-1; 150 } 151 } 152 } 153 154 $tmp = array(); 155 $tmp_users_from_user_org = array(); 156 157 for ($i=0; $i<$info["count"]; $i++) 158 { 159 $key = $info[$i]["mail"][0] . '%' . $info[$i]["telephonenumber"][0] . '%'. $info[$i]["mobile"][0] . '%' . $info[$i]["uid"][0] . '%' . $info[$i]["jpegphoto"]['count'] . '%' . $info[$i]["employeenumber"][0] . '%' . $info[$i]["ou"][0]; 160 161 if (/*(!$quickSearch_only_in_userSector) &&*/ preg_match("/$user_sector_dn/i", $info[$i]['dn'])) 162 { 163 $tmp_users_from_user_org[$key] = utf8_decode($info[$i]["cn"][0]); 164 continue; 165 } 166 167 $tmp[$key] = utf8_decode($info[$i]["cn"][0]); 168 } 169 170 natcasesort($tmp_users_from_user_org); 171 natcasesort($tmp); 172 173 if (($field != 'null') && ($ID != 'null')) 174 { 175 $i = 0; 176 177 $tmp = array_merge($tmp, $tmp_users_from_user_org); 178 natcasesort($tmp); 179 180 foreach ($tmp as $info => $cn) 181 { 182 $contacts_result[$i] = array(); 183 $contacts_result[$i]["cn"] = $cn; 184 list ($contacts_result[$i]["mail"], $contacts_result[$i]["phone"], $contacts_result[$i]["mobile"], $contacts_result[$i]["uid"], $contacts_result[$i]["jpegphoto"], $contacts_result[$i]["employeenumber"], $contacts_result[$i]["ou"]) = split ('%', $info); 185 $i++; 186 } 187 $contacts_result['quickSearch_only_in_userSector'] = $quickSearch_only_in_userSector; 188 $contacts_result['maxResult'] = $ldapService->limit; 189 } 190 else 191 { 192 $options_users_from_user_org = ''; 193 $options = ''; 194 195 196 $i = 0; 197 foreach ($tmp_users_from_user_org as $info => $cn) 198 { 199 $contacts_result[$i] = array(); 200 $options_users_from_user_org .= $this->make_quicksearch_card($info, $cn); 201 $i++; 202 } 203 204 205 foreach ($tmp as $info => $cn) 206 { 207 $contacts_result[$i] = array(); 208 $options .= $this->make_quicksearch_card($info, $cn); 209 $i++; 210 } 211 212 213 if (($options_users_from_user_org != '') && ($options != '')) 214 { 215 $head_option0 = 216 '<tr class="quicksearchcontacts_unselected">' . 217 '<td colspan="2" width="100%" align="center" style="background:#EEEEEE"><B>' . 218 $this->functions->getLang('Users from your organization') . '</B> ['.count($tmp_users_from_user_org).']'; 219 '</td>' . 220 '</tr>'; 221 222 $head_option1 = 223 '<tr class="quicksearchcontacts_unselected">' . 224 '<td colspan="2" width="100%" align="center" style="background:#EEEEEE"><B>' . 225 $this->functions->getLang('Users from others organizations') . '</B> ['.count($tmp).']'; 226 '</td>' . 227 '</tr>'; 228 } 229 230 $head_option = ''; 231 232 if( $overload ) 233 $head_option = '<tr class="quicksearchcontacts_unselected">' . 234 '<td colspan="2" width="100%" align="center" style="background:#EEEEEE; color: red;"><B>' .str_replace('%1', $this->max_result, $this->functions->getLang('More than %1 results. Please, try to refine your search.')) . '</B> '. 235 '</td>' . 236 '</tr>'; 237 238 $contacts_result = $head_option.$head_option0 . $options_users_from_user_org . $head_option1. $options; 239 240 } 241 } 242 243 ldap_close($this->ds); 244 245 return $contacts_result; 311 246 } 312 247 … … 450 385 //Busca usuarios de um contexto e ja retorna as options do select - usado por template serpro; 451 386 function search_users($params) 452 { 453 $this->ldapConnect(false,0); 454 //Monta lista de Grupos e Usuarios 455 $users = Array(); 456 $groups = Array(); 457 $user_context= $this->ldap_context; 458 $owner = $_SESSION['phpgw_info']['expressomail']['user']['owner']; 459 $filtro =utf8_encode($params['filter']); 460 $context =utf8_encode($params['context']);//adicionado 461 462 if ($this->ds) 387 { 388 $owner = $_SESSION['phpgw_info']['expressomail']['user']['owner']; 389 $ldapService = ServiceLocator::getService('ldap'); 390 $ldapService->connect($_SESSION['phpgw_info']['expressomail']['server']['ldap_host'], 391 $_SESSION['phpgw_info']['expressomail']['server']['ldap_root_dn'], 392 $_SESSION['phpgw_info']['expressomail']['server']['ldap_root_pw']); 393 394 $groups = $ldapService->accountSearch($params['filter'], array("gidNumber","cn"), $params['context'] , 'g', 'cn'); 395 $users = $ldapService->accountSearch($params['filter'], array("uidNumber","cn"), $params['context'] , 'u', 'cn'); 396 $group_options = array(); 397 $user_options = array(); 398 foreach($groups as $group) 399 { 400 $group_options[] = '"'.$group['gidNumber'].'U'.'":"'.$group['cn'].'"'; 401 } 402 403 foreach($users as $user) 463 404 { 464 $justthese = array("gidNumber","cn"); 465 if ($params['type'] == 'search') 466 $sr=ldap_search($this->ds, $context, ("(&(phpgwaccounttype=g)(!(phpgwaccountvisible=-1))(cn=*$filtro*))"),$justthese); 467 else 468 $sr=ldap_list($this->ds, $context ? $context : $user_context, ("(&(phpgwaccounttype=g)(!(phpgwaccountvisible=-1))(cn=*".$filtro."*))"),$justthese); 469 $info = ldap_get_entries($this->ds, $sr); 470 for ($i=0; $i<$info["count"]; $i++) 471 $groups[$uids=$info[$i]["gidnumber"][0]] = Array('name' => $uids=$info[$i]["cn"][0], 'type' => g); 472 $justthese = array("phpgwaccountvisible","uidNumber","cn"); 473 if ($params['type'] == 'search') 474 // $sr=ldap_search($this->ds, $user_context, ("(&(phpgwaccounttype=u)(!(phpgwaccountvisible=-1))(phpgwaccountstatus=A)(|(cn=*$filtro*)(mail=$filtro*)))"),$justthese); 475 $sr=ldap_search($this->ds, $context, ("(&(phpgwaccounttype=u)(!(phpgwaccountvisible=-1))(phpgwaccountstatus=A)(|(cn=*$filtro*)(mail=$filtro*)))"),$justthese); 476 else 477 $sr=ldap_list($this->ds, $context ? $context : $user_context, ("(&(phpgwaccounttype=u)(!(phpgwaccountvisible=-1))(phpgwaccountstatus=A)(|(cn=*$filtro*)(mail=$filtro*)))"),$justthese); 478 479 $info = ldap_get_entries($this->ds, $sr); 480 for ($i=0; $i<$info["count"]; $i++) 481 { 482 if ($info[$i]["phpgwaccountvisible"][0] == '-1') 483 continue; 484 $users[$uids=$info[$i]["uidnumber"][0]] = Array('name' => $uids=$info[$i]["cn"][0], 'type' => u); 485 } 486 } 487 ldap_close($this->ds); 488 489 @asort($users); 490 @reset($users); 491 @asort($groups); 492 @reset($groups); 493 $user_options =''; 494 $group_options =''; 495 496 foreach($groups as $id => $user_array) { 497 $newId = $id.'U'; 498 $group_options .= '<option value="'.$newId.'">'.utf8_decode($user_array['name']).'</option>'."\n"; 499 } 500 foreach($users as $id => $user_array) { 501 if($owner != $id){ 502 $newId = $id.'U'; 503 $user_options .= '<option value="'.$newId.'">'.utf8_decode($user_array['name']).'</option>'."\n"; 504 } 505 } 405 if($owner != $user['uidNumber']) 406 $user_options[] = '"'.$user['uidNumber'].'U'.'":"'.$user['cn'].'"'; 407 } 408 409 $user_options = '{'.implode( ',', $user_options ).'}'; 410 $group_options = '{'.implode( ',', $group_options ).'}'; 411 506 412 return array("users" => $user_options, "groups" => $group_options); 507 413 } 508 414 509 415 function catalogsearch($params) 510 416 { 511 $cn = $params['search_for'] ? "*".utf8_encode($params['search_for'])."*" : "*"; 512 $max_result = $params['max_result'] ? $params['max_result'] : $this->max_result; 417 $ldapService = ServiceLocator::getService('ldap'); 418 $filter = $ldapService->getSearchFilter($params['search_for'],array('u','l','s')); 419 513 420 $catalog = $params['catalog']; 514 421 $error = False; 515 if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['extended_info']) 516 $extendedinfo=true; 517 else 518 $extendedinfo=false; 422 423 //if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['extended_info']) 424 //$extendedinfo=true; 425 //else 426 //$extendedinfo=false; 519 427 520 428 … … 524 432 525 433 if ($this->ds) { 526 if ($catalog == 0){ 527 //os atributos "employeeNumber" e "ou" foram adicionado ao vetor de busca; 528 if($extendedinfo) 529 $justthese = array("cn", "mail", "phpgwaccounttype", "phpgwAccountVisible", "employeeNumber", "ou"); 530 else 531 $justthese = array("cn", "mail", "phpgwaccounttype", "phpgwAccountVisible"); 532 533 $filter="(&(|(phpgwAccountType=u)(phpgwAccountType=l))(cn=".$cn."))"; 534 //$user_context = "ou=".$params['organization'].",".$this->ldap_context; 535 }else { 536 //os atributos "employeeNumber" e "ou" foram adicionado ao vetor de busca; 537 if($extendedinfo) 538 $justthese = array("cn", "mail", "employeeNumber", "ou"); 539 else 540 $justthese = array("cn", "mail"); 541 $filter="(&(objectClass=".$this->object_class.")(cn=".$cn."))"; 542 //$user_context = $this->branch."=".$params['organization'].",".$external_srcs[$catalog]['dn']; 543 } 544 545 $sr=@ldap_search($this->ds, $user_context, $filter, $justthese, 0, $max_result+1); 434 $justthese = array("cn", "mail", "phpgwaccounttype", "phpgwAccountVisible", "employeeNumber", "ou"); 435 $sr=@ldap_search($this->ds, $user_context, $filter, $justthese, 0, $ldapService->limit+1); 436 546 437 if(!$sr) 547 438 return null; 548 439 $count_entries = ldap_count_entries($this->ds,$sr); 549 if ($count_entries > $ max_result){440 if ($count_entries > $ldapService->limit){ 550 441 $info = null; 551 442 $error = True; … … 591 482 unset($g_tmp); 592 483 593 return array('users' => $users, 'groups' => $groups, 'error' => $error );484 return array('users' => $users, 'groups' => $groups, 'error' => $error,'maxResult' => $ldapService->limit); 594 485 }else 595 486 return null; … … 676 567 function get_available_users2($params) 677 568 { 678 $this->ldapRootConnect(); 679 680 $context= $params['context']; 681 $justthese = array("cn", "uid", "cn"); 682 $filter = "(&(phpgwaccounttype=u)(!(phpgwaccountvisible=-1)))"; 683 684 if ($this->ds) 685 { 686 $sr=ldap_search($this->ds, $context, $filter, $justthese); 687 $entries = ldap_get_entries($this->ds, $sr); 688 689 for ($i=0; $i<$entries["count"]; $i++){ 690 if($_SESSION['phpgw_info']['expressomail']['user']['account_lid'] != $entries[$i]["uid"][0]){ 691 $u_tmp[$entries[$i]["uid"][0]] = $entries[$i]["cn"][0]; 692 } 693 } 694 695 natcasesort($u_tmp); 696 697 $i = 0; 698 $users = array(); 699 700 if (count($u_tmp)) 701 { 702 foreach ($u_tmp as $uidnumber => $cn) 703 { 704 $options .= "<option value=$uidnumber>$cn</option>"; 705 } 706 unset($u_tmp); 707 } 708 709 ldap_close($this->ds); 710 return $options; 711 } 569 $ldapService = ServiceLocator::getService('ldap'); 570 $ldapService->connect($_SESSION['phpgw_info']['expressomail']['server']['ldap_host'], 571 $_SESSION['phpgw_info']['expressomail']['server']['ldap_root_dn'], 572 $_SESSION['phpgw_info']['expressomail']['server']['ldap_root_pw']); 573 574 $entries = $ldapService->accountSearch($params['sentence'], array('cn', 'uid'), $params['context'], 'u', 'cn'); 575 576 $options = array(); 577 578 foreach ($entries as $value) 579 $options[] = '"'.$value['uid'].'"'.':'.'"'.$value['cn'].'"'; 580 581 return "{".implode(',',$options)."}"; 712 582 } 713 583
Note: See TracChangeset
for help on using the changeset viewer.