* @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3 * @package SWDB */ /** * Logs the user out and redirects to the login page. * * Invalidates cookies and session variables. * * @category Action */ function action(){ setcookie("user_id", null, time() - 3600); setcookie("user_token", null, time() - 3600); session_regenerate_id(); $_SESSION['session'] = false; $_SESSION['user_id'] = ""; header("Location: /"); }