changeset 4441:4ec7189bb164

auth: unauthenticated users do not have full_name_or_username - show login box instead AuthUser is only fully populated after it has been loaded with db fields ... but that only happens for authenticated users. Anonymous users could thus trigger a crash.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 12 Aug 2014 13:08:23 +0200
parents 03cc203d3e98
children 571879020000
files kallithea/templates/base/base.html
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/base/base.html	Tue Aug 12 13:08:23 2014 +0200
+++ b/kallithea/templates/base/base.html	Tue Aug 12 13:08:23 2014 +0200
@@ -314,7 +314,7 @@
 
       <div class="user-menu">
         <div id="quick_login">
-          %if c.authuser.username == 'default':
+          %if c.authuser.username == 'default' or c.authuser.user_id is None:
             <h4>${_('Login to your account')}</h4>
             ${h.form(h.url('login_home',came_from=h.url.current()))}
             <div class="form">