Hi,
Thanks for the fast reply.
This would be on a local Xwiki installation, ver 0.9.840
I get an error when I run that:
Error number 4001 in 4: Error while parsing velocity page XWiki.XWikiClasses Wrapped
Exception: Invocation of method 'listGroupsForUser' in class
com.xpn.xwiki.user.impl.xwiki.XWikiGroupServiceImpl threw exception class
java.lang.NullPointerException : null
-----Original Message-----
From: jeremi joslin [mailto:jeremi23@gmail.com]
Sent: 03 April 2006 16:37
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users]
On 4/3/06, Esbach, Brandon <Esbachb(a)tycoelectronics.com> wrote:
Hi Folks
I was wondering if there is a simple way to determine user-group membership?
Simpler than spinning through all members of that group and doing a
string match with $context.user at the least?
Hi,
it's depends if you are in the farm or not. if you are, it's not possible I
think.
If not, and if you have the programming right you can do :
$context.xWiki.groupService.listGroupsForUser($user.user.user, $context.context)
You will receive a collection of documents representing groups.
Jérémi
--
Blog:
http://www.jeremi.info
LinkedIn:
https://www.linkedin.com/profile?viewProfile=&key=1437724
Project Manager XWiki:
http://www.xwiki.org
skype: jeremi23 -- msn et gtalk : jeremi23(a)gmail.com