Plone PAS NOT hooked up to portal_membership?

I have been trying to convert my course website code to work with the new Plone 2.5.2 install. Typically, new features aren’t documented clearly or at all. The biggest hangup is the PlonePAS setup, that has changed the way membership data is accessed. No longer do portal_membership calls work, or at least not completely.  For example, context.portal_membership.listMemberIds() works, but only for the users defined in the default member plugin. I use SQLPASPlugin, and the above code does not list members defined in an SQL database.

The only way I’ve been able to get access to them programmatically is to use context.acl_users.X which I am not sure is the right way. Some test code below:

# Test code for new PAS Plugin architecture---NOT hooked into portal_membership
# print "Current User: ",context.portal_membership.getAuthenticatedMember()
# print "Users: ",context.portal_membership.listMemberIds()
# print "Search Users: ",context.portal_membership.searchForMembers(name='staff1')[0].getRoles()
# print "Search Roles: ",context.portal_membership.searchForMembers(roles='cscishstaff')
# print "acl_users: "
# users=context.acl_users.searchUsers(roles='staff')
# for u in users:
#     print "%s(%s)"%(u['userid'],u['title'])
#     print u
# return printed

Comments are closed.