Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>
  • Loading branch information
PVince81 authored and backportbot[bot] committed Apr 14, 2022
commit 0aa70b3d889418afa2192865ea191d461dd3cc87
5 changes: 3 additions & 2 deletions apps/dav/lib/Connector/Sabre/Principal.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,10 @@ protected function searchUserPrincipals(array $searchProperties, $test = 'allof'

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 = [];
Expand Down