<?php
require_once __DIR__ . '/../config/user_functions.php';

session_start();
require_once __DIR__ . '/../config/logger.php';
$_u = $_SESSION['user']['username'] ?? 'unknown';
log_action($_u, 'LOGOUT', 'system', 'User logout');
session_unset();
session_destroy();
header('Location: /smproduce/auth/login.php');
exit;
?>
