Added authentication functionality and simple role based model

This commit is contained in:
2026-02-11 15:02:37 -08:00
parent c247631de6
commit 11889e3f93
17 changed files with 341 additions and 57 deletions

View File

@@ -1,6 +1,11 @@
<?php
require 'db.php';
require 'auth.php';
require_login();
$user_id = current_user_id();
$id = intval($_GET['id'] ?? 0);
if ($id > 0) {
$pdo->prepare("DELETE FROM subtasks WHERE id = ?")->execute([$id]);
$pdo->prepare("DELETE FROM subtasks WHERE id = ? AND user_id = ?")->execute([$id, $user_id]);
}