summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-03-10 20:31:12 +0100
committerJoas Schilling <coding@schilljs.com>2021-03-11 08:42:19 +0100
commit62ef45028ea3990993a3513ca37ae80c7ff8e245 (patch)
tree83e3b16df6098f1efd0ec8bc8420da30d456b361
parent5fa52d492af28010836ebed04027dd038c52ef39 (diff)
downloadnextcloud-server-62ef45028ea3990993a3513ca37ae80c7ff8e245.tar.gz
nextcloud-server-62ef45028ea3990993a3513ca37ae80c7ff8e245.zip
Clean up the logic of the contacts store a bit
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/private/Contacts/ContactsMenu/ContactsStore.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php
index e0e0bf832b3..69f26c7969f 100644
--- a/lib/private/Contacts/ContactsMenu/ContactsStore.php
+++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php
@@ -165,21 +165,21 @@ class ContactsStore implements IContactsStore {
return false;
}
- $filterUser = true;
+ $filterOutUser = true;
$mailAddresses = $entry->getEMailAddresses();
foreach ($mailAddresses as $mailAddress) {
if ($mailAddress === $filter) {
- $filterUser = false;
+ $filterOutUser = false;
break;
}
}
if ($entry->getProperty('UID') && $entry->getProperty('UID') === $filter) {
- $filterUser = false;
+ $filterOutUser = false;
}
- if ($filterUser) {
+ if ($filterOutUser) {
return false;
}
} elseif ($restrictEnumerationPhone || $restrictEnumerationGroup) {
@@ -208,7 +208,7 @@ class ContactsStore implements IContactsStore {
if ($ownGroupsOnly && !$checkedCommonGroupAlready) {
$user = $this->userManager->get($entry->getProperty('UID'));
- if ($user === null) {
+ if (!$user instanceof IUser) {
return false;
}