/** * main action */ public function mainAction() { if ($_SESSION['client']['customer']['id'] > 0) { require_once 'models/client/client_customer.php'; $ClientCustomer = new client_customer(); if ($ClientCustomer->logout()) { msg("Logout of {$_SESSION['client']['customer']['email']}", 'ok', 1); //$_SESSION['client']['customer']['id'] = 0; unset($_SESSION['client']); // unlink basket from customer unset($_SESSION['basket']); // clear gift parameters unset($_SESSION['gift']); unset($_SESSION['gift_message']); $this->invalidateToken(); //clean facebook auth $this->logoutFromFacebook(); } else { msg("Customer logout failed", 'error'); } } //forward to the homepage onxshopGoTo(AFTER_CLIENT_LOGOUT_URL); return true; }