[xwiki-users] [SPAM] Re: [SPAM] Group identification
Sergiu Dumitriu
sergiu at xwiki.com
Mon Dec 10 12:50:28 CET 2007
Vitantonio Messa wrote:
> mattia_temp-newsgroup at yahoo.it wrote:
>> Hi Vitantonio,
>>
>> i've tried search the archive, but i didn't find something that could
>> explain it to a novice (especially due to i don't know velocity )
>>
>> Could you please help me?
>>
>> Thank you!!!
>
> Mattia,
>
> first, set the username of the current user:
> #set ($user = $xwiki.getUser())
>
> then, check if that user is in the group you want:
> #if ($user.isUserInGroup("Xwiki.XWikiGroupName")) {
> ...display something...
> }
Without {}, actually:
#if ($xwiki.getUser().isUserInGroup("XWiki.XWikiGroupName"))
...display something...
#end
>
> Hope this will help, I don't have time to check if this work, sorry.
> Vito
>
More information about the users
mailing list