<?php
function log_action($action)
{
    $db = \App\Core\Database::getInstance();
    $db->prepare("INSERT INTO audit_logs(user_id,action) VALUES (?,?)")
       ->execute([$_SESSION['user']['id'] ?? null,$action]);
}
