On 4/9/07, Gunter Leeb <[email protected]> wrote:
Hi,
I found the GroupService as in:
context.getWiki().getGroupService(context).addUserToGroup(user, database, group, context);
This GroupService interface allows me to locate users in a group and even add a user to a group.
I just looked at the GroupService code, and it seems that addUserToGroup does not actually add the user to the group, only to a cache that lists the groups a user is in. This means that you need to find another way to actually add users to a group. I don't see a method to remove a user from an XWiki group. How to do
that in plug-in code?
Basically you have to find the XObject attached to that group that has the username as the only value and delete that object. Sergiu -- http://purl.org/net/sergiu