Jérémi,
Thanks for your suggestion.
## This code shows a list of Users.
#set($sql = ", BaseObject as obj where obj.name=doc.fullName and
obj.className='XWiki.XWikiUsers'")
#foreach ($item in $xwiki.searchDocuments($sql))
#set($itemdoc = $xwiki.getDocument($item))
#set($obj = $itemdoc.getObject("XWiki.XWikiUsers"))
* $obj.name: $obj.first_name $obj.last_name
#end
The above code gives me a list of Users. How do I get a list that shows Groups, and for
each Group the Members that belong to the Group? I don't understand the XWiki object
or data model. Once I've got a Group, as per the following code, how do I get a list
of Members that belong to the Group?
## This code shows a list of Groups.
#set($sql2 = ", BaseObject as obj where obj.name=doc.fullName and
obj.className='XWiki.XWikiGroups'")
#foreach ($item in $xwiki.searchDocuments($sql2))
#set($itemdoc = $xwiki.getDocument($item))
* $itemdoc.name
#end
Thanks, John
-----Original Message-----
From: jeremi joslin [mailto:jeremi23@gmail.com]
Sent: Thursday, 16 March 2006 9:26 AM
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] List member login ID and real name by group?
On 3/16/06, Turner, John <John.Turner3(a)team.telstra.com> wrote:
Dear All,
We use login IDs that are not very meaningful. I'd like to create a
page that lists the login ID and real name of each member by group to
help with administration. I can see how to get the groups, for example:
#set($sqlGrp = ", BaseObject as obj where obj.name=doc.fullName and
obj.className='XWiki.XWikiGroups'")
#foreach ($item in $xwiki.searchDocuments($sqlGrp)) #set($itemdoc =
$xwiki.getDocument($item))
Group: $itemdoc.name <br/>
#end
How do I access the members for a given group?
Thanks, John
Hi,
maybe something like this is what you want :
#set($sqlGrp = ", BaseObject as obj where obj.name=doc.fullName and
obj.className='XWiki.XWikiUsers'")
#foreach ($item in $xwiki.searchDocuments($sqlGrp)) #set($itemdoc =
$xwiki.getDocument($item)) #set($obj = $itemdoc.getObject("XWiki.XWikiUsers"))
user: $obj.fullName $obj.name<br/>
#end
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