Files

9 lines
456 B
PHP
Raw Permalink Normal View History

2026-10-18 19:27:17 -04:00
<?php
if (PHP_SAPI !== 'cli') { http_response_code(404); exit; }
require_once __DIR__ . '/../classes/Base.php';
$db = (new Base())->connect();
$db->exec('DELETE FROM password_resets WHERE expires_at < UTC_TIMESTAMP()');
$db->exec('DELETE FROM email_verifications WHERE expires_at < UTC_TIMESTAMP()');
2026-10-18 19:27:17 -04:00
$db->exec('DELETE FROM auth_attempts WHERE window_started < DATE_SUB(UTC_TIMESTAMP(), INTERVAL 1 DAY)');
echo "Expired authentication records removed.\n";