Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 11, 2008 at 06:42 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 11, 2008 at 06:35 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 11, 2008 at 06:42 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 11, 2008 at 06:59 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 11, 2008 at 07:27 AM

    Thanks.

    VJR's response worked.

    Add comment
    10|10000 characters needed characters exceeded