set password reset

This commit is contained in:
jleroy2023
2024-11-20 13:51:00 +01:00
parent 3be58536aa
commit 2d62998c61
7 changed files with 114 additions and 16 deletions

View File

@@ -5,12 +5,17 @@ namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
class MainController extends AbstractController
{
#[Route('/', name: 'home')]
public function index(): Response
public function index(TokenStorageInterface $tokenStorage): Response
{
return $this->render('main/index.html.twig');
$token = $tokenStorage->getToken();
$userConnect = $token?->getUser();
return $this->render('main/index.html.twig', [
'profile' => $userConnect,
]);
}
}