[Zope-Checkins] CVS: Zope/lib/python/Products/SiteErrorLog - SiteErrorLog.py:1.11.4.1
Chris McDonough
chrism@zope.com
Wed, 16 Oct 2002 17:35:07 -0400
Update of /cvs-repository/Zope/lib/python/Products/SiteErrorLog
In directory cvs.zope.org:/tmp/cvs-serv27921/Products/SiteErrorLog
Modified Files:
Tag: Zope-2_6-branch
SiteErrorLog.py
Log Message:
Fix up calls to user objects' getUserName which should really be calls to
getId. This is a change designed to make it possible to disambiguate user names and user ids in subclasses of user folders, while still doing the "right thing" with respect to local data structures that keep pointers to user ids (eg. local roles, etc.)
=== Zope/lib/python/Products/SiteErrorLog/SiteErrorLog.py 1.11 => 1.11.4.1 ===
--- Zope/lib/python/Products/SiteErrorLog/SiteErrorLog.py:1.11 Wed Aug 21 10:23:24 2002
+++ Zope/lib/python/Products/SiteErrorLog/SiteErrorLog.py Wed Oct 16 17:34:36 2002
@@ -149,10 +149,13 @@
request = getattr(self, 'REQUEST', None)
url = None
username = None
+ userid = None
req_html = None
if request:
url = request.get('URL', '?')
- username = getSecurityManager().getUser().getUserName()
+ usr = getSecurityManager().getUser()
+ username = usr.getUserName()
+ userid = usr.getId()
try:
req_html = str(request)
except:
@@ -173,6 +176,7 @@
'tb_text': tb_text,
'tb_html': tb_html,
'username': username,
+ 'userid': userid,
'url': url,
'req_html': req_html,
})