mirror of
https://github.com/ZeJMaN/LBCAlerte_ynh.git
synced 2025-06-07 13:05:30 +02:00
15 lines
436 B
PHP
15 lines
436 B
PHP
<?php
|
|
|
|
if (!isset($_GET["username"]) || !$user = $userStorage->fetchByUsername($_GET["username"])) {
|
|
header("LOCATION: ?mod=admin&a=users");
|
|
exit;
|
|
}
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
$userStorage->delete($user);
|
|
$configAlert = DOCUMENT_ROOT."/var/configs/".$user->getUsername().".csv";
|
|
if (is_file($configAlert)) {
|
|
unlink($configAlert);
|
|
}
|
|
header("LOCATION: ?mod=admin&a=users");
|
|
exit;
|
|
} |