fixed problem with representation of user without last_name, thanks Bruno
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.1-alpha.2+timestamp.2012.12.27.14.26.35
|
Version 2.4.1-alpha.2+timestamp.2012.12.28.01.07.49
|
||||||
|
|||||||
+3
-3
@@ -2,8 +2,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This file is part of the web2py Web Framework
|
This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
|
||||||
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
|
|
||||||
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
|
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -1416,7 +1415,8 @@ class Auth(object):
|
|||||||
def represent(id, record=None, s=settings):
|
def represent(id, record=None, s=settings):
|
||||||
try:
|
try:
|
||||||
user = s.table_user(id)
|
user = s.table_user(id)
|
||||||
return '%(first_name)s %(last_name)s' % user
|
return '%s %s' % (user.get("first_name", user.get("email")),
|
||||||
|
user.get("last_name", ''))
|
||||||
except:
|
except:
|
||||||
return id
|
return id
|
||||||
self.signature = db.Table(
|
self.signature = db.Table(
|
||||||
|
|||||||
Reference in New Issue
Block a user