feat!: allow registration of multiple users (#340)
feat: administration area feat: add reset password functionality
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
require_once '../../includes/connect_endpoint.php';
|
||||
session_start();
|
||||
|
||||
if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) {
|
||||
die(json_encode([
|
||||
@@ -20,10 +19,11 @@ if (!isset($_POST['paymentId']) || !isset($_POST['name']) || $_POST['paymentId']
|
||||
$paymentId = $_POST['paymentId'];
|
||||
$name = $_POST['name'];
|
||||
|
||||
$sql = "UPDATE payment_methods SET name = :name WHERE id = :paymentId";
|
||||
$sql = "UPDATE payment_methods SET name = :name WHERE id = :paymentId and user_id = :userId";
|
||||
$stmt = $db->prepare($sql);
|
||||
$stmt->bindParam(':name', $name, SQLITE3_TEXT);
|
||||
$stmt->bindParam(':paymentId', $paymentId, SQLITE3_INTEGER);
|
||||
$stmt->bindParam(':userId', $userId, SQLITE3_INTEGER);
|
||||
$result = $stmt->execute();
|
||||
|
||||
if ($result) {
|
||||
|
||||
Reference in New Issue
Block a user