'warning', 'msg' => 'Form token invalid or timed out' ); $_POST = array(); $_FILES = array(); } // Handle logouts if (isset($_POST["logout"])) { if (isset($_SESSION["dual-login"])) { $_SESSION["mailcow_cc_username"] = $_SESSION["dual-login"]["username"]; $_SESSION["mailcow_cc_role"] = $_SESSION["dual-login"]["role"]; unset($_SESSION["dual-login"]); } else { session_regenerate_id(true); session_unset(); session_destroy(); session_write_close(); header("Location: /"); } }