10 Dec
2007
10 Dec
'07
11:50 a.m.
Vitantonio Messa wrote:
[email protected] 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