Actualiser register.php

This commit is contained in:
2026-05-22 11:57:02 +00:00
parent cca989a9f1
commit e7b8d8515c

View File

@@ -18,7 +18,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$hash = password_hash($password, PASSWORD_DEFAULT);
$users[$username] = [
'password' => $hash,
'role' => ($username === 'admin') ? 'Admin' : 'User'
'role' => 'User'
];
file_put_contents($usersFile, json_encode($users, JSON_PRETTY_PRINT));
header("Location: login.php?registered=1");