diff --git a/templates/users/details.html.tera b/templates/users/details.html.tera
index 1eb6325..6e091c3 100644
--- a/templates/users/details.html.tera
+++ b/templates/users/details.html.tera
@@ -2,8 +2,8 @@
{% import "macros" as macros %}
{% block title %}
-{% if author.display_name %}
- {% set name = author.display_name %}
+{% if user.display_name %}
+ {% set name = user.display_name %}
{% else %}
{% set name = user.username %}
{% endif %}