Update PasswordExpireService.php

Fix PasswordExpireService return error when user model attribute "password_changed_at" is already set at null.
This commit is contained in:
niciz
2023-11-21 14:19:17 +01:00
committed by GitHub
parent 723ae81d11
commit 3d8c4c747d

View File

@ -25,8 +25,11 @@ class PasswordExpireService implements ServiceInterface
public function run()
{
return $this->model->updateAttributes([
'password_changed_at' => null,
]);
if ($this->model->password_changed_at !== null) {
return $this->model->updateAttributes([
'password_changed_at' => null,
]);
}
return true;
}
}