1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00

Fixed count

This commit is contained in:
Eldad Fux 2021-02-23 15:03:43 +02:00
parent db898d9f9c
commit 3b9b751d5a

View file

@ -60,13 +60,14 @@ App::get('/')
$whitlistGod = $project->getAttribute('authWhitelistGod'); $whitlistGod = $project->getAttribute('authWhitelistGod');
if($whitlistGod !== 'disabled') { if($whitlistGod !== 'disabled') {
$sum = $projectDB->getCount([ // Count users $projectDB->getCollection([ // Count users
'limit' => 1,
'filters' => [ 'filters' => [
'$collection='.Database::SYSTEM_COLLECTION_USERS, '$collection='.Database::SYSTEM_COLLECTION_USERS,
], ],
]); ]);
$sum = $projectDB->getSum();
if($sum !== 0) { if($sum !== 0) {
return $response->redirect('/auth/signin'); return $response->redirect('/auth/signin');
} }