[CMF-checkins] CVS: CMF/CMFCore - MemberDataTool.py:1.26.4.1
Tres Seaver
tseaver@zope.com
Fri, 9 May 2003 12:13:28 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv5425/CMFCore
Modified Files:
Tag: CMF-1_4-branch
MemberDataTool.py
Log Message:
- Use 'getProperty', rather than getattr, to search the member data.
=== CMF/CMFCore/MemberDataTool.py 1.26 => 1.26.4.1 ===
--- CMF/CMFCore/MemberDataTool.py:1.26 Thu Apr 3 15:46:46 2003
+++ CMF/CMFCore/MemberDataTool.py Fri May 9 12:13:28 2003
@@ -114,13 +114,16 @@
search_param = 'id'
for user_wrapper in self._members.values():
- searched = getattr( user_wrapper, search_param, None )
+
+ memberProperty = user_wrapper.getProperty
+ searched = memberProperty( search_param, None )
+
if searched is not None and searched.find(search_term) != -1:
- res.append( { 'username' : getattr( user_wrapper, 'id' )
- , 'email' : getattr( user_wrapper, 'email', '' )
+
+ res.append( { 'username': memberProperty( 'id' )
+ , 'email' : memberProperty( 'email', '' )
}
)
-
return res
security.declarePrivate('pruneMemberDataContents')