diff --git a/src/Auth.php b/src/Auth.php index 788a78d..bc835cb 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -717,7 +717,7 @@ final class Auth extends UserManager { if ($this->isLoggedIn()) { $newPassword = self::validatePassword($newPassword); $userId = $this->getUserId(); - $this->updatePassword($userId, $newPassword); + $this->updatePasswordInternal($userId, $newPassword); $this->deleteRememberDirective($userId); } else { @@ -1003,7 +1003,7 @@ final class Auth extends UserManager { // if the password needs to be re-hashed to keep up with improving password cracking techniques if (\password_needs_rehash($userData['password'], \PASSWORD_DEFAULT)) { // create a new hash from the password and update it in the database - $this->updatePassword($userData['id'], $password); + $this->updatePasswordInternal($userData['id'], $password); } if ((int) $userData['verified'] === 1) { @@ -1198,7 +1198,7 @@ final class Auth extends UserManager { $newPassword = self::validatePassword($newPassword); // update the password in the database - $this->updatePassword($resetData['user'], $newPassword); + $this->updatePasswordInternal($resetData['user'], $newPassword); // delete any remaining remember directives $this->deleteRememberDirective($resetData['user']); diff --git a/src/UserManager.php b/src/UserManager.php index e6e5832..952080f 100644 --- a/src/UserManager.php +++ b/src/UserManager.php @@ -189,7 +189,7 @@ abstract class UserManager { * @param string $newPassword the new password * @throws AuthError if an internal problem occurred (do *not* catch) */ - protected function updatePassword($userId, $newPassword) { + protected function updatePasswordInternal($userId, $newPassword) { $newPassword = \password_hash($newPassword, \PASSWORD_DEFAULT); try {