Update PasswordExpireService.php
Fix PasswordExpireService return error when user model attribute "password_changed_at" is already set at null.
This commit is contained in:
@ -25,8 +25,11 @@ class PasswordExpireService implements ServiceInterface
|
|||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
return $this->model->updateAttributes([
|
if ($this->model->password_changed_at !== null) {
|
||||||
'password_changed_at' => null,
|
return $this->model->updateAttributes([
|
||||||
]);
|
'password_changed_at' => null,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user