AnsweredAssumed Answered

Hos to get full list of users & their belonging groups ?

Question asked by msevestre on Aug 5, 2009
Latest reply on Apr 1, 2010 by ilazki

I'm trying to generate a file with a JS script to help me to administrate users & group: I'd like to obtain a list with full clear test of user names & groups which they are attaached to ?

I tried to create a Javascript script that is nearly working, but I am not able to display "readable" user names & groups.

Here is the current source code:

var gens = people.getPeople(null);

var logFile = space.childByNamePath("log_users.txt");
if (logFile == null) {
   logFile = space.createFile("log_users.txt");
logFile.content = "";

for (var i=0; i<gens.length;i++) {
  logFile.content += gens[i]+"\n";

  var groupes= people.getContainerGroups(utils.getNodeFromString(gens[i]));

  for (var j=0; j<groupes.length;j++) {
    logFile.content += "\t"+groupes[j].name+"\n";


I currently have an output of this kind :


as you can see, user names have a "workspace://" type (using .name property give me "undefined" for all users). Groups are with a reference, except for basic groups (GROUP_ALFRESCO_ADMINISTRATORS, EMAIL, etc.) that are displayed clearly.

Note: if any other script exists, no problem to froget mine to use another one :)

Thanks for any help