Hi Arnaud,

On Sep 24, 2009, at 5:51 PM, Arnaud bourree wrote:

> Hello,
>
> I test it also in velocity without success.
> I try an other code
> {{groovy}}
> def sql = ""
> count = 0
> for (item in xwiki.searchDocuments(sql)) {
>   u = xwiki.getDocument(item)
>   xu = u.getObject('XWikiUsers')
>   if (null == xu) continue
>   count++
>   print item+"\n"
> }
> print "**Total "+count+"**\n"
> {{/groovy}}
>
> I still not found jdoe
> But if I edit XWiki.jdoe page in object mode there is XWikiUsers  
> object !!!

My take is that you're using MySQL as the database and in default mode  
which doesn't differentiate lowercase and uppercase.

Could that be it?

Thanks
-Vincent

> Arnaud.
>
> 2009/9/24 Oana Tabaranu <[email protected]>:
>> Hi Arnaud,
>>
>> I have tested your query in velocity and it works fine for me:
>> #set($users =$xwiki.searchDocuments(", BaseObject obj where  
>> obj.name =
>> doc.fullName and obj.className = 'XWiki.XWikiUsers' and  
>> doc.fullName <>
>> 'XWiki.Admin' and doc.fullName <> 'XWiki.TEST' and doc.fullName <>
>> 'XWiki.dummy'"))
>> #foreach ($u in  $users)
>>  $u
>> #end
>> My result is:
>> XWiki.JDOE
>> XWiki.jdoe
>>
>> Oana
>>
>> Arnaud bourree wrote:
>>> Hello,
>>>
>>> I'm building a migration to LDAP page for my company on one XWiki  
>>> 2.0
>>> RC1 instance.
>>> For this I need to list all users registered in.
>>> I used the following code to list users:
>>> for(u in xwiki.wrapDocs(xwiki.searchDocuments(", BaseObject obj  
>>> where
>>> obj.name = doc.fullName and obj.className = 'XWiki.XWikiUsers' and
>>> doc.fullName <> 'XWiki.Admin' and doc.fullName <> 'XWiki.TEST' and
>>> doc.fullName <> 'XWiki.dummy'"))) {
>>> ...
>>> }
>>>
>>> That looks good, most of my users are listed.
>>> But at least one user is missing: one user register as JDOE one time
>>> and one other time as jdoe
>>> So there are two John Doe users: XWiki.jdoe and XWiki.JDOE but my  
>>> loop
>>> only find JDOE and not jdoe
>>>
>>> What it is wrong in my request?
>>>
>>> Arnaud.
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to