Skip to content

Commit 7d77609

Browse files
authored
Merge pull request #23013 from nextcloud/bugfix/noid/show-federation-results-with-the-same-name
Show federation and email results also with exact user match unless c…
2 parents 4175c3f + 5415eed commit 7d77609

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/private/Collaboration/Collaborators/Search.php

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

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

0 commit comments

Comments
 (0)