From 6af41901ac547bf12a271341fb8daeb83b51291e Mon Sep 17 00:00:00 2001 From: Branson Stephens <branson.stephens@ligo.org> Date: Tue, 19 May 2015 09:09:54 -0500 Subject: [PATCH] Fixed a bug in base template for non-LVC users. --- templates/base.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index 8253a6012..3e285f838 100644 --- a/templates/base.html +++ b/templates/base.html @@ -45,7 +45,11 @@ function changeTime(obj, label) { <li id="nav-userprofile"><a href="{% url "userprofile-home" %}">Options</a></li> {% endif %} {% if user %} - <li id="nav-user">Authenticated as: {{ user.first_name }} {{user.last_name }}</li> + {% if user.first_name %} + <li id="nav-user">Authenticated as: {{ user.first_name }} {{user.last_name }}</li> + {% else %} + <li id="nav-user">Authenticated as: {{ user.username }}</li> + {% endif %} {% else %} <li id="nav-login"><a href="{{ login_url }}">Login</a></li> {% endif %} -- GitLab