Fix isValidOldPassword() not working in new DB class

This commit is contained in:
Kijin Sung 2020-07-06 11:40:13 +09:00
parent dfc1082c85
commit 305d045bf6

View file

@ -614,7 +614,8 @@ class DB
*/
public function isValidOldPassword(string $password, string $saved_password): bool
{
$stmt = $this->_handle->query('SELECT' . ' ' . 'PASSWORD(?) AS pw1, OLD_PASSWORD(?) AS pw2', $password, $password);
$stmt = $this->_handle->prepare('SELECT' . ' ' . 'PASSWORD(?) AS pw1, OLD_PASSWORD(?) AS pw2');
$stmt->execute([$password, $password]);
$result = $this->_fetch($stmt);
if ($this->isError() || !$result)
{