Personal tools
You are here: Home Archives One Approach to Managing Users in Plone getMemberProperties
Document Actions

getMemberProperties

Python script that takes a member's user ID and returns a dictionary of the properties of that member.

## Script (Python) "getMemberProperties"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=member
##title=
##

member = context.portal_membership.getMemberById(member)

propdict = {}

if member:
  for prop in context.portal_memberdata.propertyIds():
    propdict[prop] = member.getProperty(prop)

return propdict

Thanks to the Davis Community Network for hosting this site.