|
|
|
@ -16,7 +16,7 @@ class UserObserver
|
|
|
|
|
$passwordCol = config('ae3auth-config.user.password_column');
|
|
|
|
|
if ($user->isDirty($passwordCol)) {
|
|
|
|
|
$this->updateExpireColumn($user);
|
|
|
|
|
$user->forceChangePassword(false);
|
|
|
|
|
$this->makePasswordAvailable($user);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -48,4 +48,13 @@ class UserObserver
|
|
|
|
|
$expiresAtColumn = config('ae3auth-config.user.expires_password_column_name');
|
|
|
|
|
$user->$expiresAtColumn = now()->addDays(config('ae3auth-config.password_expires_in'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
private function makePasswordAvailable($user): void
|
|
|
|
|
{
|
|
|
|
|
$forceChangePasswordColumn = config('ae3auth-config.user.force_change_column_name');
|
|
|
|
|
$user->$forceChangePasswordColumn = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|