aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Contacts
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-03-10 20:31:12 +0100
committerJoas Schilling <coding@schilljs.com>2021-03-10 20:48:17 +0100
commitb4f6aca62485d80367984be7a141983598114bec (patch)
tree2746e3d96efca28cc9907bde6bee928a3069dd50 /lib/private/Contacts
parent61ed57b757201541b2038ccab10b092a77c4fb64 (diff)
downloadnextcloud-server-b4f6aca62485d80367984be7a141983598114bec.tar.gz
nextcloud-server-b4f6aca62485d80367984be7a141983598114bec.zip
Clean up the logic of the contacts store a bit
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Contacts')
-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;
}