AnsweredAssumed Answered

How to get the list of users

Question asked by anweber on Jul 19, 2006
Latest reply on Jan 8, 2007 by andy
Hi,

   How is  it possible to find the list of users via a code written in JS?

   I tried that:

   log("============= begin");
   var results;
   var i;
   var result;
   var searchString = "TYPE:\"{http://www.alfresco.org/model/user/1.0}user\"";
   log("users");
   
   results = search.luceneSearch(searchString);
   log ("nb =" + results.length);
   
   for (i in results){
      log(results[i]);
   } 
   log("=============== End");


I obtain no nodes.  But this Lucene search string works in the node browser.

  Thanks for your help,

              Andre

PS : In the documentation about the JavaScript API (see http://wiki.alfresco.com/wiki/JavaScript_API, the example is  not correct :

var nodes = luceneSearch("TEXT:alfresco");
should be written

var nodes = search.luceneSearch("TEXT:alfresco");

Outcomes