Commit 085ce339 authored by okhin's avatar okhin 🚴

Merge branch 'preprod' into 'master'

Preprod

See merge request !83
parents c2e068c1 b15e7390
Pipeline #2318 passed with stages
in 1 minute and 13 seconds
...@@ -91,8 +91,9 @@ class UserHandler ...@@ -91,8 +91,9 @@ class UserHandler
public function handleAdminUpdateTotalUsersCommand(AdminUpdateTotalUsersCommand $command) public function handleAdminUpdateTotalUsersCommand(AdminUpdateTotalUsersCommand $command)
{ {
// Let's get all users first // Let's get all users first
$user_ids = $this->connection->executeQuery('SELECT id FROM users')->fetchAll(\PDO::FETCH_ASSOC); $user_ids = $this->connection->executeQuery('SELECT id FROM users')->fetchAll(\PDO::FETCH_COLUMN);
var_dump($user_ids);
foreach ($user_ids as $user_id) { foreach ($user_ids as $user_id) {
$user_id = (int) $user_id; $user_id = (int) $user_id;
$total = $this->connection->executeQuery('SELECT SUM(somme) AS total FROM dons WHERE user_id = :user_id AND STATUS IN (1, 102)', [ $total = $this->connection->executeQuery('SELECT SUM(somme) AS total FROM dons WHERE user_id = :user_id AND STATUS IN (1, 102)', [
......
...@@ -42,6 +42,14 @@ $f3->set('ONERROR', function ($f3) { ...@@ -42,6 +42,14 @@ $f3->set('ONERROR', function ($f3) {
// If there is any problem, replace the current csrf // If there is any problem, replace the current csrf
$csrf = md5(rand()); $csrf = md5(rand());
$f3->CSRF = $csrf; $f3->CSRF = $csrf;
// If neither error or message are set, define them
if (!$f3->exists('SESSION.message')) {
$f3->push('SESSION.message', '');
}
if (!$f3->exists('SESSION.error')) {
$f3->push('SESSION.error', '');
}
$f3->get('container')['session']->set('csrf', $csrf); $f3->get('container')['session']->set('csrf', $csrf);
while (ob_get_level()) { while (ob_get_level()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment