AnsweredAssumed Answered

createPerson API

Question asked by kung on Mar 21, 2013
Latest reply on Mar 26, 2013 by kung
I realized that createPerson() API also creates a folder in User Homes space, which i don't want.
Is there any way to change the default space location for newly created user or is there a way to "turn off" automatic space creation upon user creation?

my code:

var newUserName = "kungfuce";
var newUserPassword = "kungfuce";
var newUser = people.createPerson(newUserName,"kung", "Fu Ce","", newUserPassword ,true);;

now i didn't state anywhere to make folder, but it is made, in User homes named "kungfuce".

i could do :
var userhome = companyhome.childByNamePath("User Homes");
var myfolder = userhome.childByNamePath(newUserName);["cm:homeFolder"] = myfolder;

but that would create two folders (yes, i know i can delete old one) but script is meant to handle A LOT of data, so those extra useless lines will slow it down.

What i want to know is if there's a way to skip that extra work and do it when creating person

Thanks in advance!