summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2018-07-20 03:08:32 +0200
committerGitHub <noreply@github.com>2018-07-20 03:08:32 +0200
commit6b440cc36558246b9651344872013aa9de21f86e (patch)
treeeb6fa3ad1a96eaaa6772be915c6425369b0162ab /lib
parenta927d2fc08a713c0b6537cf196bdd6fdfaefb317 (diff)
parent16bfbb78ca80bbebf9883f0963f4a2c58d677538 (diff)
downloadnextcloud-server-6b440cc36558246b9651344872013aa9de21f86e.tar.gz
nextcloud-server-6b440cc36558246b9651344872013aa9de21f86e.zip
Merge pull request #10296 from nextcloud/bug/noid/dont_fail_on_unkown_user
Don't fail contacts menu on unkown user
Diffstat (limited to 'lib')
-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;