Fix browser installer administrator import

This commit is contained in:
Hermes Agent
2026-09-20 14:42:36 +00:00
parent a621557820
commit fe62383625
2 changed files with 2 additions and 1 deletions
+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 = [