summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Contacts/ContactsMenu/ContactsStore.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php
index bfce7deafa4..05ef9cca53a 100644
--- a/lib/private/Contacts/ContactsMenu/ContactsStore.php
+++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php
@@ -155,7 +155,13 @@ class ContactsStore implements IContactsStore {
}
if ($ownGroupsOnly && $entry->getProperty('isLocalSystemBook') === true) {
- $contactGroups = $this->groupManager->getUserGroupIds($this->userManager->get($entry->getProperty('UID')));
+ $uid = $this->userManager->get($entry->getProperty('UID'));
+
+ if ($uid === NULL) {
+ return false;
+ }
+
+ $contactGroups = $this->groupManager->getUserGroupIds($uid);
if (count(array_intersect($contactGroups, $selfGroups)) === 0) {
// no groups in common, so shouldn't see the contact
return false;