Instead of testing yourself in your script you should add a filter in
your query. See
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module#HFromVelo…
for some examples.
On Wed, Apr 6, 2016 at 5:33 PM, Mark Sack <mark.sack(a)secti.al.gov.br> wrote:
I have a script as follows that displays a list of
users that meet some
criteria (the actual where clause I'm using is a bit more complicated than
shown below):
{{velocity}}
#set ($users=$services.query.xwql("FROM doc.object(XWiki.XWikiUsers) AS user
WHERE (user.first_name LIKE '%Mar%')").execute())
#set ($numUsers = $users.size())
#if ($numUsers > 0)
#foreach ($user in $users)
#if (!$user.isHidden())
[[$user]]
#end
#end
#end
{{/velocity}}
My problem is that the isHidden method is filtering out the users whose
pages I've marked as hidden. How can I fix this script to list only the
users who are not hidden?
Mark
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Display-users-that-are-not-hidden-tp75988…
Sent from the XWiki- Users mailing list archive at
Nabble.com.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne