Skip to content

Commit 830a434

Browse files
authored
Merge pull request #23087 from nextcloud/backport/23013/stable19
[stable19] Show federation and email results also with exact user match unless c…
2 parents 12abb5d + 679aa21 commit 830a434

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/private/Collaboration/Collaborators/Search.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ public function search($search, array $shareTypes, $lookup, $limit, $offset) {
9090
$searchResult->unsetResult($emailType);
9191
}
9292

93-
// if we have an exact local user match, there is no need to show the remote and email matches
93+
// if we have an exact local user match with an email-a-like query,
94+
// there is no need to show the remote and email matches.
9495
$userType = new SearchResultType('users');
95-
if ($searchResult->hasExactIdMatch($userType)) {
96+
if (strpos($search, '@') !== false && $searchResult->hasExactIdMatch($userType)) {
9697
$searchResult->unsetResult($remoteType);
9798
$searchResult->unsetResult($emailType);
9899
}

0 commit comments

Comments
 (0)