feat!: allow registration of multiple users (#340)

feat: administration area
feat: add reset password functionality
This commit is contained in:
Miguel Ribeiro
2024-05-26 23:30:51 +02:00
committed by GitHub
parent 57b5c3deec
commit e1006e5823
90 changed files with 3131 additions and 867 deletions
+2 -3
View File
@@ -2,17 +2,16 @@
require_once '../../includes/connect_endpoint.php';
session_start();
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
$paymentMethods = $_POST['paymentMethodIds'];
$order = 1;
foreach ($paymentMethods as $paymentMethodId) {
$sql = "UPDATE payment_methods SET `order` = :order WHERE id = :paymentMethodId";
$sql = "UPDATE payment_methods SET `order` = :order WHERE id = :paymentMethodId and user_id = :userId";
$stmt = $db->prepare($sql);
$stmt->bindParam(':order', $order, SQLITE3_INTEGER);
$stmt->bindParam(':paymentMethodId', $paymentMethodId, SQLITE3_INTEGER);
$stmt->bindParam(':userId', $userId, SQLITE3_INTEGER);
$result = $stmt->execute();
$order++;
}