diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2018-07-20 03:08:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 03:08:32 +0200 |
commit | 6b440cc36558246b9651344872013aa9de21f86e (patch) | |
tree | eb6fa3ad1a96eaaa6772be915c6425369b0162ab /lib | |
parent | a927d2fc08a713c0b6537cf196bdd6fdfaefb317 (diff) | |
parent | 16bfbb78ca80bbebf9883f0963f4a2c58d677538 (diff) | |
download | nextcloud-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.php | 8 |
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; |