feat!: allow registration of multiple users (#340)
feat: administration area feat: add reset password functionality
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
<?php
|
||||
require_once '../../includes/connect_endpoint.php';
|
||||
session_start();
|
||||
|
||||
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
|
||||
if ($_SERVER["REQUEST_METHOD"] === "DELETE") {
|
||||
$subscriptionId = $_GET["id"];
|
||||
$deleteQuery = "DELETE FROM subscriptions WHERE id = :subscriptionId";
|
||||
$deleteQuery = "DELETE FROM subscriptions WHERE id = :subscriptionId AND user_id = :userId";
|
||||
$deleteStmt = $db->prepare($deleteQuery);
|
||||
$deleteStmt->bindParam(':subscriptionId', $subscriptionId, SQLITE3_INTEGER);
|
||||
$deleteStmt->bindParam(':userId', $userId, SQLITE3_INTEGER);
|
||||
|
||||
if ($deleteStmt->execute()) {
|
||||
http_response_code(204);
|
||||
|
||||
Reference in New Issue
Block a user