Files
radio-free-elsewhere/admin/logout.php
T

12 lines
287 B
PHP
Executable File

<?php
require __DIR__ . '/../includes/auth.php';
// Logout is POST-only with a CSRF token, so other sites can't log you out with a link or image
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
verifyCsrf();
startAdminSession();
logoutAdmin();
}
header('Location: login.php');