on 09-25-2008 11:04 AM
Hi,
1. I have created one web dynpro application which creates portal users.
2. Users are getting created but somehow Login Id is not getting created.
3. Checked in Portal -- User Adiministration also.
4. Also I am not able to login using those username & pwd.
5. It shows all other details like first name, last name, unique name & display name except Login id.
What may be the problem?
Thanks in advance,
Best regards,
Hi,
creating a new user
IUserFactory userfact = UMFactory.getUserFactory();
IUserMaint userMaint = userfact.newUser("TestUser");
userMaint.setDisplayName("My Name");
userMaint.setFirstName("Test");
userMaint.setLastName("User");
userMaint.save();
userMaint.commit();
assigning a role (in this case 'administrator') to the user
IRole role = null;
role=UMFactory.getRoleFactory().getRoleByUniqueName("Administrator");
if(null!=role)
{
wdComponentAPI.getMessageManager().reportSuccess("Adding User::"userMaint.getName()" to role ::"+role.getDisplayName());
UMFactory.getRoleFactory().addUserToRole(userMaint.getUniqueID(),role.getUniqueID());
}
creating an account for the user
IUserAccountFactory accountFact = UMFactory.getUserAccountFactory();
IUserAccount account = accountFact.newUserAccount("MyLogonID",userMaint.getUniqueID());
account.setPassword("password");
account.save();
account.commit();
Now you will be able to login with user name 'MyLogonID' and password 'password'.
hope it wil help u.
Thanks
Abhilasha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got the required result
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nilesh,
go through this doc:[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0bd5112-4456-2b10-c28b-9654d5ae8111]
hpe it hlps
Regards
Khushboo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Verify your code with code posted in the following WIKI :
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/createandeditEPuserwithJava+code
Siddharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.