-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
When the throttle_limit is shorter than the lifetime, we don't have the possibility to tell the user when he can ask for a new request.
The ResetPasswordToken use the expiresAt property for the getExpirationMessageKey and getExpirationMessageData.
We can maybe implement similar function for the throttle_limit:
getThrottleMessageKey()getThrottleMessageData()getThrottleAtIntervalInstance()
Say that lifetime is 3600 and throttle_limit is 600. With this 2 new functions, we can use it in twig as follow:
<p>
This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.
</p>
<p>
You can only request a new password in {{ resetToken.throttleMessageKey|trans(resetToken.throttleMessageData, 'ResetPasswordBundle') }}.
</p>We can maybe create a property to tell when user can ask for a new request:
public function getThrottleAt(): \DateTimeInterface
{
// ...
}TymekB and On5-Repos
Metadata
Metadata
Assignees
Labels
No labels