Fixed count

This commit is contained in:
Eldad Fux
2021-02-23 15:03:43 +02:00
parent db898d9f9c
commit 3b9b751d5a
+4 -3
View File
@@ -60,13 +60,14 @@ App::get('/')
$whitlistGod = $project->getAttribute('authWhitelistGod');
if($whitlistGod !== 'disabled') {
$sum = $projectDB->getCount([ // Count users
'limit' => 1,
$projectDB->getCollection([ // Count users
'filters' => [
'$collection='.Database::SYSTEM_COLLECTION_USERS,
],
]);
$sum = $projectDB->getSum();
if($sum !== 0) {
return $response->redirect('/auth/signin');
}