Skip to content

Commit 88341b0

Browse files
committed
[symfony#2359] Making check for app.user shorter
1 parent 1b25c86 commit 88341b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/controller/error_pages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ end-user, create a new template located at
5656
by your error pages), because the router runs before the firewall. If
5757
the router throws an exception (for instance, when the route does not
5858
match), then using ``is_granted`` will throw a further exception. You
59-
can use ``is_granted`` safely by saying ``{% if app.user is not null and is_granted('...') %}``.
59+
can use ``is_granted`` safely by saying ``{% if app.user and is_granted('...') %}``.
6060

6161
.. tip::
6262

0 commit comments

Comments
 (0)