[Zope-Checkins] CVS: Zope/lib/python/Products/SiteErrorLog - SiteErrorLog.py:1.12

Chris McDonough chrism@zope.com
Wed, 16 Oct 2002 17:15:13 -0400


Update of /cvs-repository/Zope/lib/python/Products/SiteErrorLog
In directory cvs.zope.org:/tmp/cvs-serv21516/lib/python/Products/SiteErrorLog

Modified Files:
	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.12 ===
--- 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:14:42 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.getUserId()
                     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,
                     })