[xwiki-users] Retrieve all users of a given group
Jeremie BOUSQUET
jeremie.bousquet at gmail.com
Mon Jun 18 12:35:54 UTC 2012
Maybe $user.isUserInGroup('XWiki.Gestionnaires') ?
2012/6/18 Stéphanie <stephanie.roulland at gmail.com>:
> Hello,
>
> I'm trying to retrieve all users of a given group, but maybe there is a
> problem with my code.
>
> First, this is my code :
>
> {{velocity}}
>
> #set($users = $xwiki.rightsmanager.usersApi.allUsersNames)
> #foreach($user in $users)
> $user
> #if($user.isUserInGroup('Gestionnaires'))
> $user
> #end
> #end
>
> {{/velocity}}
>
> I have 6 users in my group "Gestionnaires" but none of these users is
> displayed with this code.
>
> Do you have an idea of why it doesn't work ? Do I forget something ?
>
> Thank you very much in advance for everyone who will answer me ^^
>
> Thanks,
> Stéphanie
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Retrieve-all-users-of-a-given-group-tp7579699.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
More information about the users
mailing list