<?php
/**
 * Cleanup Expired OTPs
 * Cron job to remove expired and used OTPs
 */

require_once('../otp_service.php');

$otpService = new OTPService();
$otpService->cleanExpiredOTPs();

// Log cleanup
$logFile = __DIR__ . '/../logs/otp_cleanup.log';
$timestamp = date('Y-m-d H:i:s');
file_put_contents($logFile, "[$timestamp] Cleaned expired OTPs\n", FILE_APPEND); 