I have a Plone 4 site which uses LDAP for authentication. I have an API from another system which returns a list of user IDs which correspond to LDAP users. I want to add those users to a group in Plone.
I have a script which calls api.group.add_user() like this:
for userid in users_list:
api.group.add_user(groupname='mygroup', username=userid)
However, it throws an error about:
UserNotFoundError
I think that plone.api is not checking if these users exist in LDAP. How can I either make it not check and add the usernames as strings, or how do I make the lookups work against LDAP?