On Friday 19 April 2002 12:02 pm, Heimo Laukkanen wrote:
I made just a quick hack to the code. In setMemberProperties I changes the saved value to be a string. I am not sure if this will cause any problems, but I doubt it.
I also noticed a funny thing in your code compared to the MemberData code. XUFTools puts the full mapping into the properties, while MemberDataTool only puts those properties that are really defined in the tool. In the concrete use this means that with XUFTool now even information about the request gets stored in the member properties.
-huima
def setMemberProperties(self, mapping): '''Sets the properties of the member. ''' #just pass the properties over to acl_users.currentPropSource memberdatatool = self.getTool() propsource = memberdatatool.acl_users.currentPropSource username = self.getUserName()
for key in mapping.keys(): propsource.setUserProperty(key=key, ---->here value=str(mapping[key]), username=username)
#let the parent class take care of self._members MemberData.setMemberProperties(self, mapping)
I see what you mean about the properties mapping I think, Heimo. Does it cause a problem? Changing the value to a string is probably not a good idea if you want to store more complex data structures in a property, but for most uses it shouldn't make much difference, if any. XUF pickles everything anyway before storing it I think, or at least with the SQL propsources it does. Harry