From 188191889f87a6a03f8488620d6c8fb0f0378806 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 18 Jan 2014 09:55:56 +0000 Subject: [PATCH] fix for inactive types --- lam/lib/account.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 95efb5ce..564691ba 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -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);