WIP: Implement profile editing

This commit is contained in:
Björn Fromme committed 2023-09-17 19:36:18 +02:00
1 parent 97c5a686af
commit bfc5e5e242
17 files changed
+498 -18

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Controller;
use App\Entity\User;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class IndexController extends AbstractController
{
#[Route('/', name: 'app_index')]
public function index(): Response
{
/** @var User $user */
$user = $this->getUser();
if (null === $user) {
return $this->redirectToRoute('app_security_login');
}
return $this->redirectToRoute($user->getDefaultRoute());
}
}