Skip to content

Commit c17f6a4

Browse files
BA-JBIVincentLanglet
authored andcommitted
Remove usage of username get parameter in CheckEmailAction.php
Remove usage as discussed in #1692 (comment)
1 parent a293f40 commit c17f6a4

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/Action/CheckEmailAction.php

+1-12
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,21 @@
1515

1616
use Sonata\AdminBundle\Admin\Pool;
1717
use Sonata\AdminBundle\Templating\TemplateRegistryInterface;
18-
use Symfony\Component\HttpFoundation\RedirectResponse;
19-
use Symfony\Component\HttpFoundation\Request;
2018
use Symfony\Component\HttpFoundation\Response;
21-
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
2219
use Twig\Environment;
2320

2421
final class CheckEmailAction
2522
{
2623
public function __construct(
2724
private Environment $twig,
28-
private UrlGeneratorInterface $urlGenerator,
2925
private Pool $adminPool,
3026
private TemplateRegistryInterface $templateRegistry,
3127
private int $tokenTtl
3228
) {
3329
}
3430

35-
public function __invoke(Request $request): Response
31+
public function __invoke(): Response
3632
{
37-
$username = $request->query->get('username');
38-
39-
if (null === $username) {
40-
// the user does not come from the sendEmail action
41-
return new RedirectResponse($this->urlGenerator->generate('sonata_user_admin_resetting_request'));
42-
}
43-
4433
return new Response($this->twig->render('@SonataUser/Admin/Security/Resetting/checkEmail.html.twig', [
4534
'base_template' => $this->templateRegistry->getTemplate('layout'),
4635
'admin_pool' => $this->adminPool,

0 commit comments

Comments
 (0)