prepare("delete from users where id = ?"); $s->bind_param("s", $id); return new ReturnT(data: ($s->execute() !== false)); } if (Utils_ThisFileIsRequested(__FILE__)) { require_once("../_json.php"); // HACK: for debugging purposes. Will be removed later if ($Config["debug"]) $_POST = $_REQUEST; $result = User_Delete_Method($_POST); if ($result->IsError()) { $result->ThrowJSONError(); } else { // If it was self-deletion if ($id === $THIS_USER) EndSession(); JSON_ReturnData(["success" => $result->GetData()]); } } ?>