[Web] Fix password issue on first login when adding new admin

master
andryyy 2021-09-06 11:46:09 +02:00
parent bc7714b8f3
commit 4d5ebafc1a
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ function admin($_action, $_data = null) {
if (password_check($password, $password2) !== true) {
return false;
}
$password_hashed = hash_password($password_new);
$password_hashed = hash_password($password);
$stmt = $pdo->prepare("INSERT INTO `admin` (`username`, `password`, `superadmin`, `active`)
VALUES (:username, :password_hashed, '1', :active)");
$stmt->execute(array(