Start your All-Access Pass to unlock this challenge
Buy Access Login

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?

Select your answer
Skip challenges and

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.