| 1 |
<?php |
<?php |
| 2 |
// $Id: LDAPInterface.inc,v 1.2 2009/05/08 21:07:03 miglius Exp $ |
// $Id: LDAPInterface.inc,v 1.3 2009/06/01 12:02:56 miglius Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 192 |
function search($base_dn, $filter, $attributes = array()) { |
function search($base_dn, $filter, $attributes = array()) { |
| 193 |
$ret = array(); |
$ret = array(); |
| 194 |
|
|
| 195 |
|
// For the AD the '\,' should be replaced by the '\\,' in the search filter. |
| 196 |
|
$filter = preg_replace('/\\\,/', '\\\\\,', $filter); |
| 197 |
|
|
| 198 |
set_error_handler(array('LDAPInterface', 'void_error_handler')); |
set_error_handler(array('LDAPInterface', 'void_error_handler')); |
| 199 |
$x = @ldap_search($this->connection, $base_dn, $filter, $attributes); |
$x = @ldap_search($this->connection, $base_dn, $filter, $attributes); |
| 200 |
restore_error_handler(); |
restore_error_handler(); |