Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-03-10 22:31:12 +0300
committerJoas Schilling <coding@schilljs.com>2021-03-10 22:48:17 +0300
commitb4f6aca62485d80367984be7a141983598114bec (patch)
tree2746e3d96efca28cc9907bde6bee928a3069dd50
parent61ed57b757201541b2038ccab10b092a77c4fb64 (diff)
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;
}