Start your All-Access Pass to unlock this challenge
Challenge 1 / 2
We put the limiter inside the block that runs only when the form is submitted and valid, right before the new user is created:
if ($form->isSubmitted() && $form->isValid()) {
$limit = $limiterFactory->create($request->getClientIp())->consume();
if (!$limit->isAccepted()) {
// ...
}
// ... create the user
}
Why not consume a token as soon as the form is submitted?
Skip challenges and