cancel
Showing results for 
Search instead for 
Did you mean: 

How to set password entered by user in the custom self registration app?

Former Member
0 Kudos

Hi All,

I am trying to create a customized self registration page on the portal logon page using Webdynpro JAVA application. Now the problem I am facing is that I am not able to identify how to set the initial password for the user in the portal that is entered by the user while registering through the application.

I am using the object as:

IUserFactory userFact = UMFactory.getUserFactory();

IUserMaint userMaint = userFact.newUser(user);

I am able to set different parameters such as First Name,Last Name, User Id, Email Id, etc but not the password.

Any pointers will be highly appreciated.

Thanks in Advance.

Regards.

Rajat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rajat Jain,

Try the below code.

IUserAccountFactory mAccountFact = UMFactory.getUserAccountFactory();

IUserAccount userAccount =mAccountFact.getUserAccountByLogonId(login); // Provide login

IUserAccount muserAccount = mAccountFact.getMutableUserAccount(userAccount.getUniqueID());

muserAccount.setPassword(oldPassword.trim(), confirmPassword.trim());

muserAccount.save();

muserAccount.commit();

Regards,

VJR.

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks.

VJR's response worked.

siddharth_jain
Active Contributor
0 Kudos

Hi ,

Check the following SAP WIKI :

https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/createandeditEPuserwithJava+code

athough the code is written in java class but you can use it in WD As well.

Siddharth

Former Member
0 Kudos

Hi Ruturaj,

My requirement is to get the initial password from the user when he is entering the data in the form. I do not want the initially defined password from the system...

Thanks.

Regards.

Rajat

Former Member
0 Kudos

Hi rajat

Please check this link

http://help.sap.com/SAPHELP_NW04S/helpdata/EN/44/0761cea5c610b3e10000000a11466f/content.htm

Hope it will help you

Regards

Ruturaj