diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-04-14 16:07:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 16:07:25 +0300 |
commit | 0824f440f0007bdf1665e4a8d5b9fc482e235e9f (patch) | |
tree | 27883731d4ea2c33e2c85914606da1e2c4dd8b1f /apps/dav/lib/Connector/Sabre | |
parent | 3ca797129ced4546d4b3d0c5e84a1871decca55c (diff) | |
parent | 1bac5e2cbe17a3f7accb203a5baf4f8809ceef16 (diff) |
Merge pull request #31886 from nextcloud/bugfix/noid/principal-search-case-insensitive-dn
Principal search by display name case insensitive
Diffstat (limited to 'apps/dav/lib/Connector/Sabre')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Principal.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index 8002f963798..c3f06f95783 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -347,9 +347,10 @@ class Principal implements BackendInterface { if (!$allowEnumeration) { if ($allowEnumerationFullMatch) { + $lowerSearch = strtolower($value); $users = $this->userManager->searchDisplayName($value, $searchLimit); - $users = \array_filter($users, static function (IUser $user) use ($value) { - return $user->getDisplayName() === $value; + $users = \array_filter($users, static function (IUser $user) use ($lowerSearch) { + return strtolower($user->getDisplayName()) === $lowerSearch; }); } else { $users = []; |