cancel
Showing results for 
Search instead for 
Did you mean: 

To Obtain Logged user information

Former Member
0 Kudos

Hi

I am trying to achieve the following

To get the user information(user id,session Id etc) of the users who logged into portal from webdynpro application. My webdynpro runtime and portal runtime are different.

Things trying to do:

1. Write a portal service where i can get the user information of the person who logged into the portal.

2. Accessing this Portal service from webdynpro where from this portal service i get the user info.

Problems Facing: - I am not able to get the logged user information from the portal service.

Any help?

Please suggest me if there is any better approach for the same.

Regards

NagaKishore V

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kishore,

you need to add <b>com.sap.security.api</b>jar file in your project, then you can get <b>IUser</b> object by

<b>IUser user = WDClientUser.getCurrentUser().getSAPUser();</b>

You can also check out the following links. They will help you.

<b>Regards,

<i>Sai Krishna Tadepalli.</i></b>

<b>PS: Plz do Reward points if it helps.</b>

Former Member
0 Kudos

Hi NagaKishore,

Pls check if the following code, that captures the user id from a portal in the webdynpro, helps.

IWDClientUser wdUser = WDClientUser.getCurrentUser();

IUser user = wdUser.getSAPUser();

IUserAccount acct = user.getUserAccounts();

String strUserid = acct.getLogonUserid();

Regards

Noufal