[xwiki-users] How to remove a user from a group?
Sergiu Dumitriu
sergiu.dumitriu at gmail.com
Mon Apr 9 14:32:01 CEST 2007
On 4/9/07, Gunter Leeb <Gunter.Leeb at mediaprint.at> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xwiki.org/pipermail/users/attachments/20070409/21330e59/attachment-0001.htm
More information about the users
mailing list