aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-05-16 12:20:05 +0200
committerGitHub <noreply@github.com>2022-05-16 12:20:05 +0200
commit64a912ea7b6cfc46efb30ee8d6c4e1ba3f0de8bd (patch)
treec57e9e6528193a6dda377c23a48065ce000b3117
parent032e64f730e46877b4bfa209c63cffd524bb4eaf (diff)
parent0aa70b3d889418afa2192865ea191d461dd3cc87 (diff)
downloadnextcloud-server-64a912ea7b6cfc46efb30ee8d6c4e1ba3f0de8bd.tar.gz
nextcloud-server-64a912ea7b6cfc46efb30ee8d6c4e1ba3f0de8bd.zip
Merge pull request #31976 from nextcloud/backport/31886/stable23
[stable23] Principal search by display name case insensitive
-rw-r--r--apps/dav/lib/Connector/Sabre/Principal.php5
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 = [];