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