I'm trying to make a table with all entities from the database. This works fine, but in the entity is only the user id saved.
How I can fetch the username?
{% for invite in invites %}
<tr>
<td>{{ invite.code}}</td>
<td>{{ invite.creator }}</td> {# This line returns the user id, but how I can get the username? #}
<td>{{ invite.creationdate|format_datetime(locale='de') }}</td>
<td><a class="btn btn-danger btn-sm" href="{{ path('admin.invite.delete', {'id': invite.id}) }}">
<i class="fas fa-trash">
</i>
Delete
</a>
</td>
</tr>
{% endfor %}