cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on User Creation

oluwasegzy
Champ in-the-making
Champ in-the-making
Please i need somebody to tell me what am doing wrong to create a new user


here is my code

it all the properties of the user in a Map below

properties.put(ContentModel.PROP_USERNAME, username);
         properties.put(ContentModel.PROP_FIRSTNAME, fName);
         properties.put(ContentModel.PROP_LASTNAME, lName);
         properties.put(ContentModel.PROP_ADDRESSEE, address);
         properties.put(ContentModel.PROP_EMAIL, eMail);
         properties.put(ContentModel.PROP_MOBILE, mobile);
         properties.put(ContentModel.PROP_ACCOUNT_EXPIRES, Boolean.valueOf(false));
         properties.put(ContentModel.PROP_CREDENTIALS_EXPIRE, Boolean.valueOf(false));
         properties.put(ContentModel.PROP_ENABLED, Boolean.valueOf(true));
         properties.put(ContentModel.PROP_ACCOUNT_LOCKED, Boolean.valueOf(false));


i then create the person


personService.createPerson(properties);


only to check my Alfresco server to see the user created but cannot login with the username and password credentials

what could be wrong……
1 REPLY 1

scouil
Star Contributor
Star Contributor
Is your user created and not able to login or not created at all?
(cf.   http://[your server]:8080/share/page/console/admin-console/users#state=panel%3Dsearch%26search%3D*    )

Are you triggering your code with an administrator (someone who has the right to create users)

Do you have anything in the logs?