diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 9dbabe4e3f7..8c9128f1c56 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1568,7 +1568,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; }