diff --git a/Account/Account.php b/Account/Account.php index 597ea510c..35fa37898 100644 --- a/Account/Account.php +++ b/Account/Account.php @@ -561,11 +561,13 @@ class Account implements ArrayableInterface, \JsonSerializable */ public function generatePassword(string $password) : void { - $this->password = \password_hash($password, \PASSWORD_DEFAULT); + $temp = \password_hash($password, \PASSWORD_DEFAULT); - if ($this->password === false) { + if ($temp === false) { throw new \Exception(); } + + $this->password = $temp; } /**