mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Merge pull request #31976 from nextcloud/backport/31886/stable23
[stable23] Principal search by display name case insensitive
This commit is contained in:
commit
64a912ea7b
1 changed files with 3 additions and 2 deletions
|
|
@ -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 = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue