summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Contacts/ContactsMenu/ContactsStore.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php
index 299e88ad01b..87aff258aae 100644
--- a/lib/private/Contacts/ContactsMenu/ContactsStore.php
+++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php
@@ -94,7 +94,7 @@ class ContactsStore {
// whether to filter out local users
$skipLocal = false;
// whether to filter out all users which doesn't have the same group as the current user
- $ownGroupsOnly = $this->config->getAppValue('core', 'shareapi_only_share_with_group_members', 'no');
+ $ownGroupsOnly = $this->config->getAppValue('core', 'shareapi_only_share_with_group_members', 'no') === 'yes';
$selfGroups = $this->groupManager->getUserGroupIds($self);
@@ -172,7 +172,17 @@ class ContactsStore {
}
}
- return $match ? $this->contactArrayToEntry($match) : null;
+ if ($match) {
+ $match = $this->filterContacts($user, [$this->contactArrayToEntry($match)]);
+ if (count($match) === 1) {
+ $match = $match[0];
+ } else {
+ $match = null;
+ }
+
+ }
+
+ return $match;
}
/**