{# /** * @file * Theme override to present all user data. * * This template is used when viewing a registered user's page, * e.g., example.com/user/123. 123 being the user's ID. * * Available variables: * - content: A list of content items. Use 'content' to print all content, or * print a subset such as 'content.field_example'. Fields attached to a user * such as 'user_picture' are available as 'content.user_picture'. * - attributes: HTML attributes for the container element. * - user: A Drupal User entity. * - roles: Array of roles for this user. * - view_mode: View mode; for example, "teaser" or "full". * - base_path: The base path, the result of base_path(). * - access_profiles: Does the current user have access to view profiles. * * @see template_preprocess_user() */ #} {%- set classes = [ 'user', 'user--profile', 'user--id-' ~ user.id, roles ? roles|join(' '), user.isBlocked() ? 'user--is-blocked' : 'user--is-active', view_mode ? 'user--view-mode-' ~ view_mode|clean_class, ] -%} {%- if user.isBlocked() -%} {%- trans %}This user is {% endtrans %}{% trans %}Blocked{% endtrans -%} {%- endif -%} {{- title_prefix -}} {%- if label -%} {%- if view_mode == 'full' -%} {{- label -}} {%- else -%} {%- if access_profiles -%} {{- label -}} {%- else -%} {{- label -}} {%- endif -%} {%- endif -%} {%- endif -%} {{- title_suffix -}} {%- if content -%} {{- content -}} {%- endif -%}