how to create user in nuxeo?

we are developing custom php applicaion in nuxeo. there is no user creation model document in your documentation center.please explain how to create user via php automation client?

0 votes

1 answers

1459 views

ANSWER



I think you can not create users via automation client you should use rest api. Or you can experiment with the code below in client if usermanager is available.

 UserManager userManager = Framework.getService(UserManager.class);

             DocumentModel newUser = userManager.getBareUserModel();
          newUser.setProperty("user", "username",
                  name+surname);
          newUser.setProperty("user", "firstName",
                  name);
          newUser.setProperty("user", "lastName",
                 surname);
          newUser.setProperty("user", "email",
                  name.concat(surname+"@example.com"));
                  name+surname);
0 votes