diff --git a/index.php b/index.php
index 02cc717..0af56e5 100644
--- a/index.php
+++ b/index.php
@@ -481,6 +481,7 @@ if (!empty($_GET['deleted'])) {
ID |
Nom |
Email |
+ |
@@ -489,7 +490,7 @@ if (!empty($_GET['deleted'])) {
= htmlspecialchars($u['id']) ?> |
= htmlspecialchars($u['name']) ?> |
= htmlspecialchars($u['email']) ?> |
- Supprimer |
+ Supprimer |
@@ -507,12 +508,12 @@ if (!empty($_GET['deleted'])) {
if ($action === 'delete_user' && isset($_SESSION['owner_id']) && $_SESSION['owner_id'] == 1) {
$id = intval($_GET['id'] ?? 0);
- if ($id > 0) {
- $stmt = $pdo->prepare("DELETE FROM users WHERE id = ?");
+ if ($id > 1) {
+ $stmt = $db->prepare("DELETE FROM owners WHERE id = ?");
$stmt->execute([$id]);
}
- header("Location: index.php?action=list_users&deleted=1");
+ header("Location: index.php?action=admin&deleted=1");
exit;
}