how to get user spaces using Webscript in alfresco

1.3k views Asked by At

i'm working on a small project to get the current user spaces in alfresco. i searched in the few days buts no result.

can any one help me to get the current user spaces using webscript in alfresco.

thanks you

1

There are 1 answers

2
marsbard On BEST ANSWER

Do you mean the user's home folder? In java you can do it like this:

NodeRef personNode = personService.getPerson(userName);
NodeRef homeFolderNode = nodeService.getProperty(personNode, ContentModel.PROP_HOMEFOLDER);

In javascript you could get it like this:

var userhome = companyhome.childByNamePath("User Homes/" + userName);

If you're looking for something other than that, please comment.