Password should be PDO::PARAM_STR, not PDO::PARAM_INT

This commit is contained in:
Michael Erdely 2024-10-11 17:54:57 -04:00
parent 381628e571
commit 5c64d87304
No known key found for this signature in database
GPG key ID: E0266F2210925BC7

View file

@ -41,7 +41,7 @@ if ($action == "approve") {
$stmt->execute();
}
$stmt = $smarty->dbh()->prepare("UPDATE {$opt["table_prefix"]}users SET approved = 1, password = {$opt["password_hasher"]}(?) WHERE userid = ?");
$stmt->bindParam(1, $pwd, PDO::PARAM_INT);
$stmt->bindParam(1, $pwd, PDO::PARAM_STR);
$stmt->bindValue(2, (int) $_GET["userid"], PDO::PARAM_INT);
$stmt->execute();