1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-08-03 22:57:27 +02:00

Rename method 'updatePassword' to 'updatePasswordInternal'

This commit is contained in:
maxsenft
2018-03-20 15:45:25 +01:00
committed by Marco
parent 1d54ff2f6b
commit e14f3d1925
2 changed files with 4 additions and 4 deletions

View File

@@ -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']);

View File

@@ -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 {