Fix profile page crash when not logged in

This commit is contained in:
rubenwardy 2020-12-10 22:43:02 +00:00
parent 5ab8c2f0f1
commit fc3a481e6f

@ -17,7 +17,7 @@
</a> </a>
{% endif %} {% endif %}
{% if current_user.rank.atLeast(current_user.rank.MODERATOR) and user.email %} {% if current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.MODERATOR) and user.email %}
<a class="btn btn-secondary float-right mr-3" href="{{ url_for('admin.send_single_email', username=user.username) }}"> <a class="btn btn-secondary float-right mr-3" href="{{ url_for('admin.send_single_email', username=user.username) }}">
{{ _("Send Email") }} {{ _("Send Email") }}
</a> </a>