mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-04 07:07:25 +02:00
Use 'changePasswordForUserById' for 'changePasswordForUserByUsername'
This commit is contained in:
@@ -401,19 +401,15 @@ final class Administration extends UserManager {
|
||||
* @throws AuthError if an internal problem occurred (do *not* catch)
|
||||
*/
|
||||
public function changePasswordForUserByUsername($username, $newPassword) {
|
||||
$newPassword = self::validatePassword($newPassword);
|
||||
|
||||
$userData = $this->getUserDataByUsername(
|
||||
\trim($username),
|
||||
[ 'id' ]
|
||||
);
|
||||
|
||||
$this->updatePasswordInternal(
|
||||
$this->changePasswordForUserById(
|
||||
(int) $userData['id'],
|
||||
$newPassword
|
||||
);
|
||||
|
||||
$this->deleteRememberDirectiveForUserById((int) $userData['id']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user