I find my answer, and maybe it can help some people. It's not : #if($user.isUserInGroup('Gestionnaires')) But, it's : #if($xwiki.getUser($user).isUserInGroup("XWiki.Gestionnaires")) Hope it can be useful for someone else ^^ Thanks, Stéphanie 2012/6/18 Stéphanie Roulland <[email protected]>
I've already tried that too but it doesn't work too.
2012/6/18 Jeremie BOUSQUET <[email protected]>
Maybe $user.isUserInGroup('XWiki.Gestionnaires') ?
2012/6/18 Stéphanie <[email protected]>:
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-tp7579... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Stéphanie ROULLAND 06.77.99.36.41 ------------------------- Contrat de professionnalisation DCNS Ingénieur domaine collaboratif 02.29.05.42.23
-- Stéphanie ROULLAND 06.77.99.36.41 ------------------------- Contrat de professionnalisation DCNS Ingénieur domaine collaboratif 02.29.05.42.23