var newUserName = "tata";
var newUserPassword = "toto";
var result = remote.call("api/people/");
var newUser = people.createPerson(newUserName,"toto", "toto","toto@somedomain.com", newUserPassword ,true);
newUser.properties["cm:homeFolder"]=companyhome.createFolder(newUserName);
newUser.save();
var personObj = {
userName: "test",
password: "test",
firstName: "test",
lastName: "test",
email: "test@test.fr",
disableAccount: false,
quota: -1
};
var connector = remote.connect("alfresco");
var result = connector.post("/api/people", jsonUtils.toJSONString(personObj), "application/json");
if (result.status == status.STATUS_OK) {
var pers = eval('(' + result.response + ')');
model.userName = pers.userName;
}
else {
//error
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.