{# Who is signed in, at the top of the application shell's account menu. Only that: the shell draws the button that opens the menu, and the divider under this block before the entries, when the slot is not empty. The name is "Surname, Name" when the profile has both and whichever it has otherwise. A profile not filled in yet (an account opened without asking for a name) shows the address alone, once, and its first letter stands in for the initials. #} {% set profile = current_user.profile %} {% set parts = [profile.surname, profile.name] | select | list if profile else [] %} {% set initials = ([profile.name, profile.surname] | select | map('first') | join) if profile else '' %}
{% if parts %}
{{ parts | join(', ') }}
{{ current_user.email }}
{% else %}
{{ current_user.email }}
{% endif %}