Merge pull request #10296 from nextcloud/bug/noid/dont_fail_on_unkown_user
Don't fail contacts menu on unkown user
This commit is contained in:
commit
6b440cc365
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue