public function configureData() { // Logout user Model_User::logout(); // Go back to home or to where I was if (substr($_SERVER['HTTP_REFERER'], 0, strlen(Conf::get('ROOT_PATH'))) == Conf::get('ROOT_PATH')) { header('Location: ' . $_SERVER['HTTP_REFERER']); } else { header('Location: ' . Conf::get('ROOT_PATH')); } }
/** * 退出 */ public function logoutAction() { $model = new Model_User(); $model->logout(); $this->gotoUri('index', 'login'); }
/** User logs in */ public function logout() { Model_User::logout(); }
public function action_logout() { Model_User::logout(); Response::redirect('portal'); }
<?php require_once './global.php'; require_once './helpers/secure.php'; Model_User::logout(); header("Location: index.php");