searchfilter in loaduser is now limited to 1024 characters
This commit is contained in:
parent
e9ad4e446a
commit
6e87054468
|
@ -941,8 +941,11 @@ function loaduser($dns) {
|
||||||
$search .= ")";
|
$search .= ")";
|
||||||
}
|
}
|
||||||
else $search = substr($dns, 0, strpos($dns, ','));
|
else $search = substr($dns, 0, strpos($dns, ','));
|
||||||
// search for users
|
/* if string is langer then 1024 characters we have to search for all users and
|
||||||
$result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_UserSuffix(), $search);
|
* output only the selcted users because searchfilter would be too big
|
||||||
|
*/
|
||||||
|
if (strlen($search<1024)) $result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_UserSuffix(), $search);
|
||||||
|
else $result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_UserSuffix());
|
||||||
$entry = ldap_first_entry($_SESSION['ldap']->server(), $result);
|
$entry = ldap_first_entry($_SESSION['ldap']->server(), $result);
|
||||||
// loop for every found user
|
// loop for every found user
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
Loading…
Reference in New Issue