2010/5/18 Ben Stuggler <[email protected]>:
Hi,
I would like to create a directory of users (with name, phone and email) who are in a specific group but I'm not comfortable with query. Is there anybody who have already work on a thing like this?
To avoid temporally the problem, I thought add a tag on the concerned users, like this we can have a list of the user and go on the profile page, but XWiki has to be blacklisted, so it's doesn't work for usual user.
Thanks
Regard
Ben
-- View this message in context: http://xwiki.475771.n2.nabble.com/User-directory-tp5069225p5069225.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
You can try the following groovy code {{groovy}} for(du in xwiki.search("select doc from XWikiDocument doc, BaseObject obj where obj.name = doc.fullName and obj.className = 'XWiki.XWikiUsers' and doc.fullName <> 'XWiki.Admin' order by doc.fullName")) { u = xwiki.getDocument(du.fullName) if (!u.isUserInGroup('mygroup')) continue print "[["+u+"]] fn="+u.first_name+" ln="+u.last_name+" "+u.email+" "; } {{/groovy}} Hop that help you Arnaud.