fix for inactive types
This commit is contained in:
parent
2d59facb16
commit
188191889f
|
@ -662,7 +662,11 @@ function searchLDAPByAttribute($name, $value, $objectClass, $attributes, $scopes
|
||||||
elseif (sizeof($filterParts) > 1) {
|
elseif (sizeof($filterParts) > 1) {
|
||||||
$filter = '(& ' . implode(' ', $filterParts) . ')';
|
$filter = '(& ' . implode(' ', $filterParts) . ')';
|
||||||
}
|
}
|
||||||
|
$activeTypes = $_SESSION['config']->get_ActiveTypes();
|
||||||
for ($s = 0; $s < sizeof($scopes); $s++) {
|
for ($s = 0; $s < sizeof($scopes); $s++) {
|
||||||
|
if (!in_array($scopes[$s], $activeTypes)) {
|
||||||
|
continue; // skip non-active account types
|
||||||
|
}
|
||||||
// search LDAP
|
// search LDAP
|
||||||
$sr = @ldap_search($_SESSION['ldap']->server(), escapeDN($_SESSION['config']->get_Suffix($scopes[$s])),
|
$sr = @ldap_search($_SESSION['ldap']->server(), escapeDN($_SESSION['config']->get_Suffix($scopes[$s])),
|
||||||
$filter, $attributes, 0, $_SESSION['config']->get_searchLimit(), 0, LDAP_DEREF_NEVER);
|
$filter, $attributes, 0, $_SESSION['config']->get_searchLimit(), 0, LDAP_DEREF_NEVER);
|
||||||
|
|
Loading…
Reference in New Issue