From 9a819b16dd67f9cdac5cdaa705643da1fca3683c Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 10 Feb 2026 13:26:47 +0100 Subject: [PATCH] feat(user_ldap): Add config for partial search compatibility with ActiveDirectory Signed-off-by: Marcel Klehr --- apps/user_ldap/lib/Access.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 7f395f03bf3..ca1906f2540 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1572,7 +1572,12 @@ class Access extends LDAPUtility { if ($term === '') { $result = '*'; } elseif ($allowEnum) { - $result = $term . '*'; + $activeDirectoryCompat = $this->appConfig->getValueBool('user_ldap', 'partial_search_active_directory_compatibility', false); + if ($activeDirectoryCompat) { + $result = '*' . $term . '*'; + } else { + $result = $term . '*'; + } } return $result; }