fix for inactive types

This commit is contained in:
Roland Gruber 2014-01-18 09:55:56 +00:00
parent 2d59facb16
commit 188191889f
1 changed files with 4 additions and 0 deletions

View File

@ -662,7 +662,11 @@ function searchLDAPByAttribute($name, $value, $objectClass, $attributes, $scopes
elseif (sizeof($filterParts) > 1) {
$filter = '(& ' . implode(' ', $filterParts) . ')';
}
$activeTypes = $_SESSION['config']->get_ActiveTypes();
for ($s = 0; $s < sizeof($scopes); $s++) {
if (!in_array($scopes[$s], $activeTypes)) {
continue; // skip non-active account types
}
// search LDAP
$sr = @ldap_search($_SESSION['ldap']->server(), escapeDN($_SESSION['config']->get_Suffix($scopes[$s])),
$filter, $attributes, 0, $_SESSION['config']->get_searchLimit(), 0, LDAP_DEREF_NEVER);