2023-07-17 19:15:18 +00:00
|
|
|
<?php declare(strict_types=1);
|
2023-06-26 02:13:52 +00:00
|
|
|
require __DIR__ . '/../init.php';
|
2023-06-08 15:36:44 +00:00
|
|
|
|
|
|
|
const MAX_TESTING_ACCOUNT_AGE = 86400 * 10;
|
|
|
|
|
|
|
|
foreach (query('select', 'users', ['type' => 'testing']) as $account) {
|
|
|
|
$account_age = time() - date_create_immutable_from_format('Y-m-d H:i:s', $account['registration_date'])->getTimestamp();
|
|
|
|
if ($account_age > MAX_TESTING_ACCOUNT_AGE)
|
|
|
|
authDeleteUser($account['id']);
|
|
|
|
}
|