cancel
Showing results for 
Search instead for 
Did you mean: 

How to get current IUser (com.sapportals.portal.security.usermanagement)

former_member188498
Active Participant
0 Kudos

Hi,

does anybody know how to get IUser for the current user?

I know how to get current IUser from com.sap.security.api package:

IWDClientUser wdcu = WDClientUser.getCurrentUser();

IUser sapUser = wdcu.getSAPUser();

but I need to have IUser from com.sapportals.portal.security.usermanagement package.

Regards,

Ladislav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

go thru this link

it might helps you.

thanks,

Lohi.

Answers (1)

Answers (1)

Former Member
0 Kudos

Ladislav,

Try this:

Get the IUser uisng the API com.sap.security.api.IUser and store it in a variable, say <i>sapUser</i>.

Then,

// Convert the logged in user to old EP5 usermanagement API 

com.sapportals.portal.security.usermanagement.IUser user = null;
try 
{
     com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getEP5User(sapUser);
} 
catch (UserManagementException e)
{
     e.printStackTrace();
}

Bala