Fixed count
This commit is contained in:
parent
db898d9f9c
commit
3b9b751d5a
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue