set password reset
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user