diff --git a/src/Controller/ProfileController.php b/src/Controller/ProfileController.php index f95b264d..be4dea2f 100644 --- a/src/Controller/ProfileController.php +++ b/src/Controller/ProfileController.php @@ -45,6 +45,14 @@ class ProfileController extends AbstractController $this->encoder = $encoder; } + /** + * @Route(path="/", name="fos_user_profile_show", methods={"GET"}) + */ + public function profileAction() + { + return $this->redirectToRoute('user_profile', ['username' => $this->getUser()->getUsername()]); + } + /** * @Route(path="/{username}", name="user_profile", methods={"GET"}) * @Security("is_granted('view', profile)")