!--a11y-->
User 
The SAP WebAS Java and the SAP Enterprise Portal are provides interfaces to get details about the current user.
The user management factory give access to the user management functions. The user management factory is in the following package:
com.sap.security.api.UMFactory
The IUser interface provides read access to the available user information.
Examples for user information:
· Company the user belongs to.
· Profile information, like full name and address)
· Authorization information. Which rights does the user have.
The IUserMaint interface extends the IUser interface and provides methods to change the user information. One reason for the separation is the performance. Most applications only need read access. The IUser interface does not have to deal with the overhead necessary to change a user and is therefore faster.
The user management factory provides several methods to get the IUser object, for example, get user by user name. For all available methods, please refer to the Javadoc.
Example:
//Get an 'IUserFactory'-object to instantiate user-objects. |
In EP
5.0 it was possible to get the logon ID with the getUid() method of the user factory.
This method is deprecated in EP 6.0 due to the fact that a user can be
associated with several logon accounts. The method getUniqueId() is a substitution for
getUid(), but the returned value has to
be parsed to get the logon ID. You can access the logon ID by iterating
through the IUserAccounts array that is returned by method
getUserAccounts()T, with method
getLogonUid().
String logonID = user.getUid(); |