Database: start reworking the DBA to work with PDO

This commit is contained in:
2025-05-13 20:51:43 +02:00
parent 7faa59562d
commit 8dbf1dce7b
9 changed files with 391 additions and 506 deletions

View File

@@ -23,7 +23,7 @@ class Authentication
$password_hash = Registry::get('db')->queryValue('
SELECT password_hash
FROM users
WHERE emailaddress = {string:emailaddress}',
WHERE emailaddress = :emailaddress',
[
'emailaddress' => $emailaddress,
]);
@@ -132,9 +132,9 @@ class Authentication
return Registry::get('db')->query('
UPDATE users
SET
password_hash = {string:hash},
reset_key = {string:blank}
WHERE id_user = {int:id_user}',
password_hash = :hash,
reset_key = :blank
WHERE id_user = :id_user',
[
'id_user' => $id_user,
'hash' => $hash,