
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
  <div>
    <a href="{{ path('fos_user_profile_show') }}">{{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }}</a> |
    <a href="{{ path('fos_user_security_logout') }}">
        {{ 'layout.logout'|trans([], 'FOSUserBundle') }}
    </a>
  </div>
{% endif %}

{% for key, flash in app.session.getFlashes() %}
  <div class="{{ flash }}">
      {{ key|trans([], 'FOSUserBundle') }}
  </div>
{% endfor %}