Show TOC

Getting the Current UserLocate this document in the navigation structure

Prerequisites

You have protected your application by requiring authentication.

Context

Before you check for authorizations, you must ensure that you have the current user. Getting the current user is also useful for personalizing an application.

Procedure

  • The IAuthentication interface of the user management engine (UME) API provides the getLoggedInUser() method.
  • The WDClientUser interface of the Web Dynpro API provides the getClientUser() method.

Example

            IUser user = UMFactory.getAuthenticator().getLoggedInUser(request, response);

         

Next Steps

SAP Help Portal: http://help.sap.com/javadocs