diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-04-08 10:20:24 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2022-04-14 13:11:04 +0000 |
commit | 0aa70b3d889418afa2192865ea191d461dd3cc87 (patch) | |
tree | 04b2e8eee32de14dfb4c092e6845dc20044d247a /apps | |
parent | e2f137c2db38e3dc7c34edd6833441aabc8d3700 (diff) | |
download | nextcloud-server-0aa70b3d889418afa2192865ea191d461dd3cc87.tar.gz nextcloud-server-0aa70b3d889418afa2192865ea191d461dd3cc87.zip |
Principal search by display name case insensitive
Adjust principal search to be case insensitive even with exact match.
This aligns the behavior to how the search also works in
Collaborators/UserPlugin
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps')
-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 = []; |