I am trying to get a list of all LDAP users.
I have the following code, but it only give me users who are members in plone groups
groups_tool = getToolByName(context, 'portal_groups') #gives users only in plone groups
groups = acl_users.source_groups.getGroupIds()
for group_id in groups:
group = groups_tool.getGroupById(group_id)
if group is None:
members = group.getGroupMembers()
for m in members:
member_email = m.getProperty('email')
#print member_email +"\n"
I know I can get an LDAP user with the following code even if they don’t exist in Plone
member = context.acl_users.getUserById(someid)
I still can figure out how to get a list of all LDAP users. Can someone point me in the right direction? Thanks