Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Collaboration/Collaborators/Search.php')
-rw-r--r--lib/private/Collaboration/Collaborators/Search.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php
index 69027e7b553..788804971a3 100644
--- a/lib/private/Collaboration/Collaborators/Search.php
+++ b/lib/private/Collaboration/Collaborators/Search.php
@@ -88,9 +88,10 @@ class Search implements ISearch {
$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');
- if($searchResult->hasExactIdMatch($userType)) {
+ if (strpos($search, '@') !== false && $searchResult->hasExactIdMatch($userType)) {
$searchResult->unsetResult($remoteType);
$searchResult->unsetResult($emailType);
}