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:
@@ -717,7 +717,7 @@ final class Auth extends UserManager {
|
|||||||
if ($this->isLoggedIn()) {
|
if ($this->isLoggedIn()) {
|
||||||
$newPassword = self::validatePassword($newPassword);
|
$newPassword = self::validatePassword($newPassword);
|
||||||
$userId = $this->getUserId();
|
$userId = $this->getUserId();
|
||||||
$this->updatePassword($userId, $newPassword);
|
$this->updatePasswordInternal($userId, $newPassword);
|
||||||
$this->deleteRememberDirective($userId);
|
$this->deleteRememberDirective($userId);
|
||||||
}
|
}
|
||||||
else {
|
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 the password needs to be re-hashed to keep up with improving password cracking techniques
|
||||||
if (\password_needs_rehash($userData['password'], \PASSWORD_DEFAULT)) {
|
if (\password_needs_rehash($userData['password'], \PASSWORD_DEFAULT)) {
|
||||||
// create a new hash from the password and update it in the database
|
// 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) {
|
if ((int) $userData['verified'] === 1) {
|
||||||
@@ -1198,7 +1198,7 @@ final class Auth extends UserManager {
|
|||||||
$newPassword = self::validatePassword($newPassword);
|
$newPassword = self::validatePassword($newPassword);
|
||||||
|
|
||||||
// update the password in the database
|
// update the password in the database
|
||||||
$this->updatePassword($resetData['user'], $newPassword);
|
$this->updatePasswordInternal($resetData['user'], $newPassword);
|
||||||
|
|
||||||
// delete any remaining remember directives
|
// delete any remaining remember directives
|
||||||
$this->deleteRememberDirective($resetData['user']);
|
$this->deleteRememberDirective($resetData['user']);
|
||||||
|
@@ -189,7 +189,7 @@ abstract class UserManager {
|
|||||||
* @param string $newPassword the new password
|
* @param string $newPassword the new password
|
||||||
* @throws AuthError if an internal problem occurred (do *not* catch)
|
* @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);
|
$newPassword = \password_hash($newPassword, \PASSWORD_DEFAULT);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user