public function logout() { if (\SESSION::get('uid') != '') { // session_destroy(); // session_unset(); \SESSION::remove_all(); // only for this app // setcookie(PREFX.'st',0,1); header("Location: ./"); // here we can put session message like "you logged out" exit; } else { \CORE::msg('debug', 'Not signed in yet'); } }