From 5d53e72ad431eed363850f2d83ab42dc03eb7320 Mon Sep 17 00:00:00 2001 From: "Angelo Galleja (ga.n)" Date: Mon, 21 May 2018 07:25:25 +0200 Subject: [PATCH] Fix issue #9798 see https://github.com/symfony/symfony-docs/issues/9798 --- security.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security.rst b/security.rst index 5b5298b6c36..e3bf05e6129 100644 --- a/security.rst +++ b/security.rst @@ -1052,10 +1052,10 @@ the User object, and use the ``isGranted()`` method (or An alternative way to get the current user in a controller is to type-hint the controller argument with - :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface\\UserInterface` + :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface` (and default it to ``null`` if being logged-in is optional):: - use Symfony\Component\Security\Core\User\UserInterface\UserInterface; + use Symfony\Component\Security\Core\User\UserInterface; public function indexAction(UserInterface $user = null) {