Files
Commerce/logout.php
“VeLiTi” 6f1cc27ec4 Initial commit
2025-01-30 11:43:37 +01:00

15 lines
406 B
PHP

<?php
// Prevent direct access to file
defined(security_key) or exit;
// check if customer is logged-in...
if (isset($_SESSION['account_loggedin'])) {
// Remove the session variables
unset($_SESSION['account_loggedin']);
unset($_SESSION['account_id']);
unset($_SESSION['account_role']);
unset($_SESSION['banner']);
}
// Redirect to home page
header('Location: ' . url('index.php'));
?>