15 lines
406 B
PHP
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'));
|
|
?>
|