mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-03 14:47:30 +02:00
Forget remembered sessions when passwords are reset or changed
This commit is contained in:
@@ -626,6 +626,9 @@ class Auth {
|
||||
if (password_verify($oldPassword, $passwordInDatabase)) {
|
||||
// update the password in the database
|
||||
$this->updatePassword($userId, $newPassword);
|
||||
|
||||
// delete any remaining remember directives
|
||||
$this->deleteRememberDirective($userId);
|
||||
}
|
||||
else {
|
||||
throw new InvalidPasswordException();
|
||||
@@ -848,6 +851,9 @@ class Auth {
|
||||
// update the password in the database
|
||||
$this->updatePassword($resetData['user'], $newPassword);
|
||||
|
||||
// delete any remaining remember directives
|
||||
$this->deleteRememberDirective($resetData['user']);
|
||||
|
||||
try {
|
||||
$this->db->delete(
|
||||
'users_resets',
|
||||
|
Reference in New Issue
Block a user