Display user full name then fallback to username and only display change password link is user has usable password

This commit is contained in:
Roberto Rosario
2011-02-07 14:34:26 -04:00
parent be267c476c
commit f2aae01780

View File

@@ -27,8 +27,10 @@
{% if user.is_anonymous %}
{% trans 'Anonymous' %}
{% else %}
{{ user }}
<a href="{% url password_change_view %}">({% trans 'New password' %})</a>
{{ user.full_name|default:user }}
{% if has_usable_password %}
<a href="{% url password_change_view %}">({% trans 'New password' %})</a>
{% endif %}
{% endif %}
</li>
{% if user.is_staff %}