This commit is contained in:
2026-09-12 10:57:11 +02:00
parent bcd85f131b
commit 5a5456ffe0
3 changed files with 28 additions and 6 deletions
+4 -2
View File
@@ -112,9 +112,10 @@ function fociz_log_audit(?int $userId, string $action, string $resourceType = ''
$statusNormalized = 'SUCCESS';
}
$createdAt = date('Y-m-d H:i:s');
$stmt = $db->prepare("
INSERT INTO audit_logs (user_id, user_email, action, resource_type, resource_id, details, ip_address, user_agent, status, created_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NOW())
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
");
$stmt->execute([
$userId ?: null,
@@ -125,7 +126,8 @@ function fociz_log_audit(?int $userId, string $action, string $resourceType = ''
$detailsJson,
$ip,
$ua,
$statusNormalized
$statusNormalized,
$createdAt
]);
} catch (Throwable $e) {
// Audit log mag NOOIT de applicatiewerking breken