Merge pull request #23087 from nextcloud/backport/23013/stable19
[stable19] Show federation and email results also with exact user match unless c…
This commit is contained in:
commit
830a4348f9
|
@ -90,9 +90,10 @@ class Search implements ISearch {
|
||||||
$searchResult->unsetResult($emailType);
|
$searchResult->unsetResult($emailType);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we have an exact local user match, there is no need to show the remote and email matches
|
// if we have an exact local user match with an email-a-like query,
|
||||||
|
// there is no need to show the remote and email matches.
|
||||||
$userType = new SearchResultType('users');
|
$userType = new SearchResultType('users');
|
||||||
if ($searchResult->hasExactIdMatch($userType)) {
|
if (strpos($search, '@') !== false && $searchResult->hasExactIdMatch($userType)) {
|
||||||
$searchResult->unsetResult($remoteType);
|
$searchResult->unsetResult($remoteType);
|
||||||
$searchResult->unsetResult($emailType);
|
$searchResult->unsetResult($emailType);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue