* */ require_once('../../src/base.inc.php'); // Verify User is admin if (!$_SESSION['currentUser']->isAdmin()) { header('Location: ' . buildUrl('moderate/')); exit; } $error = ''; $user = false; if (isset($_GET['id']) and is_numeric($_GET['id'])) { $user = User::getById($_GET['id']); if ($user !== false and isset($_GET['confirmed'])) { $user->delete(); header('Location: index.php'); } } require_once('../src/header.inc.php'); echo "
Are you sure you want to delete " . $user->getName() ."?
" . "getId() ."&confirmed\">Yes" . " No
"; } else { echo "No user to delete.
"; } require_once('../src/footer.inc.php'); ?>