From 44c95f97a4a93890901eb35f9631b32ea0da3550 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 15 Mar 2011 21:48:49 +0100 Subject: [PATCH] [SecurityBundle] fixed profiler template when the user is logged in but has no roles --- .../Resources/views/Collector/security.html.twig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index 35df3b0157..83309a0baf 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -5,8 +5,8 @@ Security {% endset %} {% set text %} - {% if collector.authenticated %} - {{ collector.user }} + {% if collector.user %} + {{ collector.user }} ({{ collector.authenticated ? 'auth.' : 'not auth.' }}) {% elseif collector.enabled %} not authenticated {% else %} @@ -25,10 +25,11 @@ {% block panel %}

Security

- {% if collector.authenticated %} + {% if collector.user %}

Username: {{ collector.user }}
- Roles: {{ collector.roles|yaml_encode }} + Authenticated? {{ collector.authenticated ? 'yes' : 'no' }}
+ Roles: {{ collector.roles|yaml_encode }}

{% elseif collector.enabled %}