summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-04-08 10:20:24 +0200
committerVincent Petry <vincent@nextcloud.com>2022-04-08 10:20:24 +0200
commit1bac5e2cbe17a3f7accb203a5baf4f8809ceef16 (patch)
tree72725a046c124963523e63fcac1024b6b7164ee5 /apps
parent69378e15347630cdf4c3c7465a951857926e52ec (diff)
downloadnextcloud-server-1bac5e2cbe17a3f7accb203a5baf4f8809ceef16.tar.gz
nextcloud-server-1bac5e2cbe17a3f7accb203a5baf4f8809ceef16.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.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 = [];