Teste de atualizacao

refatoracoes-metodos
Pablo 10 months ago
parent 4d4765cdf5
commit 2e5a8ffa97

@ -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'))
]);
}
}

@ -30,5 +30,6 @@ return [
'expires_password_column_name' => env('EXPIRES_PASSWORD_COLUMN_NAME', 'password_expires_at'),
'user_model' => env('USER_MODEL', 'App\\Models\\User'),
'password_column' => env('PASSWORD_COLUMN', 'password'),
]
],
'password_expires_in' => intval(env('PASSWORD_EXPIRES_IN', 30))
];

Loading…
Cancel
Save