cancel
Showing results for 
Search instead for 
Did you mean: 

User name And Passward

Former Member
0 Kudos

Hi All,

How to get User Name , Passward in to pcd using Webdynpro PCD JSPDYNAPAGES , please .

Thanks & Regards,

Suresh

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member189631
Active Contributor
0 Kudos

Please check the code,

  • To get the user Name

try {

IUser user = WDClientUser.getCurrentUser().getSAPUser();

String userName = user.getUniqueName().toUpperCase();

}

catch(WDUMException e){

}

  • To check the password -

I dont think we can get the password from portal but you can validate your password with the string.

IUserAccount mu = UMFactory.getUserAccountFactory().getUserAccountByLogonId(wdContext.currentContextElement().getUserName());

IUserAccount mua = UMFactory.getUserAccountFactory().getMutableUserAccount(mu.getUniqueID());

String oldPwd = "welcome123";

if(mua.checkPassword(oldPwd) {

// PASSWORD IS SAME

}

Ram