1 Commits
Author SHA1 Message Date
Hermes Agent fe62383625 Fix browser installer administrator import 2026-09-20 14:42:36 +00:00
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -44,3 +44,4 @@ Alle Einträge verwenden ISO-8601-Timestamps in UTC. Mehrere Änderungen desselb
- Installer löscht sich nach erfolgreicher Installation selbst und verwendet zusätzlich einen Completion-Marker.
- Root-Layout des Git-Repositories hergestellt; die Anwendung liegt direkt im Repository-Root.
- Beispielkonfiguration und Sicherheitsdokumentation bereitgestellt.
- Browserinstaller korrigiert: Der initiale Administrator wird jetzt mit allen im `users`-Schema erforderlichen Pflichtfeldern angelegt.
+1 -1
View File
@@ -73,7 +73,7 @@ if (($_SERVER['REQUEST_METHOD'] ?? 'GET') === 'POST') {
$db->exec($sql);
}
$adminHash = password_hash((string)$_POST['admin_password'], PASSWORD_DEFAULT);
$admin = $db->prepare("INSERT INTO users (username, email, password_hash, role, status) VALUES (:username, :email, :password_hash, 'admin', 'active') ON DUPLICATE KEY UPDATE email = VALUES(email), password_hash = VALUES(password_hash), role = 'admin', status = 'active'");
$admin = $db->prepare("INSERT INTO users (username, email, first_name, last_name, street_address, postal_code, city, country_code, password_hash, role, status) VALUES (:username, :email, '', '', '', '', '', 'AT', :password_hash, 'admin', 'active') ON DUPLICATE KEY UPDATE email = VALUES(email), password_hash = VALUES(password_hash), role = 'admin', status = 'active'");
$admin->execute(['username' => $values['admin_user'], 'email' => $values['admin_email'], 'password_hash' => $adminHash]);
$runtimeConfig = [