Fix error on not authenticated users

This commit is contained in:
Patrick Jentsch 2023-11-20 09:35:53 +01:00
parent ab132746e7
commit eb0e7c9ba1

View File

@ -12,8 +12,12 @@
<li><a href="{{ url_for('main.news') }}"><i class="material-icons left">email</i>News</a></li>
<li>
<a class="dropdown-trigger no-autoinit" data-target="nav-more-dropdown" href="#!" id="nav-more-dropdown-trigger">
{% if current_user.is_authenticated %}
<img src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt="avatar" class="circle left" style="height: 54px; padding: 10px 10px 0 0;">
{{ current_user.username }} ({{ current_user.email }})
{% else %}
<i class="material-icons left">more_vert</i>
{% endif %}
</a>
</li>
</ul>