Hello, 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","kung@smain.com", newUserPassword ,true); newUser.save();
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);
newUser.properties["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