diff --git a/lam/docs/devel/upgrade.htm b/lam/docs/devel/upgrade.htm
index 822a3da4..91d4e83c 100644
--- a/lam/docs/devel/upgrade.htm
+++ b/lam/docs/devel/upgrade.htm
@@ -33,15 +33,15 @@
-
-
Upgrade notes
-
-
-
+ Upgrade notes
+
+
+
+
-
+
Upgrade notes
@@ -50,6 +50,11 @@ This is a list of API changes for all LAM releases.
+5.7 -> 5.8
+
+ - All account types allow multiple configurations by default.
+
+
5.6 -> 5.7
- module interface: get_pdfEntries() must return an array key =>
diff --git a/lam/lib/account.inc b/lam/lib/account.inc
index 0801a46b..2f9196db 100644
--- a/lam/lib/account.inc
+++ b/lam/lib/account.inc
@@ -705,11 +705,8 @@ function searchLDAPByFilter($filter, $attributes, $scopes, $attrsOnly = false) {
$readAttributesOnly = 1;
}
$typeManager = new \LAM\TYPES\TypeManager();
- $types = $typeManager->getConfiguredTypes();
+ $types = $typeManager->getConfiguredTypesForScopes($scopes);
foreach ($types as $type) {
- if (!in_array($type->getScope(), $scopes)) {
- continue;
- }
// search LDAP
$entries = searchLDAPPaged($_SESSION['ldap']->server(), escapeDN($type->getSuffix()),
$filter, $attributes, $readAttributesOnly, $_SESSION['config']->get_searchLimit());
diff --git a/lam/lib/config.inc b/lam/lib/config.inc
index fa53aa01..eb57ad0b 100644
--- a/lam/lib/config.inc
+++ b/lam/lib/config.inc
@@ -1105,15 +1105,15 @@ class LAMConfig {
/**
* Returns the LDAP suffix for the given account type
*
- * @param string $scope account type
+ * @param string $typeId account type
* @return string the LDAP suffix
*/
- public function get_Suffix($scope) {
- if ($scope == "tree") {
+ public function get_Suffix($typeId) {
+ if ($typeId == "tree") {
return $this->treesuffix;
}
else {
- return $this->typeSettings['suffix_' . $scope];
+ return $this->typeSettings['suffix_' . $typeId];
}
}
diff --git a/lam/lib/types.inc b/lam/lib/types.inc
index cf6452a4..9993e7fa 100644
--- a/lam/lib/types.inc
+++ b/lam/lib/types.inc
@@ -268,7 +268,8 @@ class ConfiguredType {
if ($this->additionalLdapFilter !== null) {
return $this->additionalLdapFilter;
}
- $this->additionalLdapFilter = $this->typeManager->getConfig()->get_Suffix($typeId);
+ $typeSettings = $this->typeManager->getConfig()->get_typeSettings();
+ $this->additionalLdapFilter = isset($typeSettings['filter_' . $this->id]) ? $typeSettings['filter_' . $this->id] : '';
return $this->additionalLdapFilter;
}