|
|
|
@ -13,6 +13,9 @@ class UserObserver
|
|
|
|
|
public function updating($user): void
|
|
|
|
|
{
|
|
|
|
|
PasswordHistoryManager::logPassword($user);
|
|
|
|
|
$user->update([
|
|
|
|
|
'password_expires_at' => now()->addDays(config('ae3auth-config.password_expires_in'))
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -22,5 +25,8 @@ class UserObserver
|
|
|
|
|
public function created($user): void
|
|
|
|
|
{
|
|
|
|
|
PasswordHistoryManager::logNewPassword($user->id, $user->password);
|
|
|
|
|
$user->update([
|
|
|
|
|
'password_expires_at' => now()->addDays(config('ae3auth-config.password_expires_in'))
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|