Skip to content

Commit fc75fb8

Browse files
committed
[book][security] Clarifying detail about getting User object in a template
1 parent f46a61c commit fc75fb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

book/security.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,9 @@ look like:
11901190
user is actually authenticated, check for the ``IS_AUTHENTICATED_FULLY``
11911191
role.
11921192

1193-
In a Twig Template this object can be accessed via :class:`Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables`
1193+
In a Twig Template this object can be accessed via the ``app.user`` key,
1194+
which calls the :method:`GlobalVariables::getUser()<Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables::getUser>`
1195+
method:
11941196

11951197
.. configuration-block::
11961198

0 commit comments

Comments
 (0)