diff options
author | Leif Johansson <leifj@sunet.se> | 2011-08-16 13:30:51 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2011-08-16 13:30:51 +0200 |
commit | 2ad60725b712e1fcea5c79bb085edb7c89f38a19 (patch) | |
tree | 659084b604880f0afde0fa01186724b6728f68b5 /coip/extensions | |
parent | e3618b195de9ad343dc89a98d58c0af5aff50d97 (diff) |
switch back to profile but more stdnewprofiles
Diffstat (limited to 'coip/extensions')
-rw-r--r-- | coip/extensions/templatetags/userdisplay.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/coip/extensions/templatetags/userdisplay.py b/coip/extensions/templatetags/userdisplay.py index 8bdd63f..e7d3852 100644 --- a/coip/extensions/templatetags/userdisplay.py +++ b/coip/extensions/templatetags/userdisplay.py @@ -7,10 +7,13 @@ MOMENT = 120 # duration in seconds within which the time difference def userdisplay(user): cn = user.get_full_name() - if not cn and hasattr(user,'identifier'): - id = user.identifier + if not cn: + id = user.get_profile().identifier if id: - cn = user.identifier.value + if id.display_name: + cn = id.display_name + else: + cn = "%s according to %s" % (id.value,id.idp) if not cn: cn = user.username return cn |