Skip to Content
avatar image
Former Member

WDClientUser.getCurrentUser() doesn't return getClientUserID()

Hi,

i'm trying to get the User-ID of the current user in a webdynpro application. There's no Portal or any other security API installed.

the WD-application is marked for authorization and the user has to log-on, when starting the application.

The Problem is, the following code just returns a number instead of the user-id, which I would expect:

IWDClientUser user = WDClientUser.getCurrentUser();
String userID = user.getClientUserID()

other getter-methods work as expected (getLasName(), ...)

it's the same problem with forceLoggedInClientUser() .

kr, achim

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 15, 2004 at 03:25 PM

    Hi,

    the only way to get the login name of the user is via IUser. Since the IWDClientUser can represent a named/authenticated user, but also an unnamed anonymous user (for which the UME IUser is null), the IWDClientUser wrapper has its own identifier. This identifier is used internally to handle the existing ClientUsers.

    So, the recommended way to get the login name is

    WDClientUser.getCurrentUser().getSAPUser().getUniqueName().

    Best regards,

    Timo

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 14, 2004 at 04:48 PM

    Hi Achim,

    In order to get the User if to the logged on user use the following piece of code.

    IWDClientUser user = WDClientUser.getCurrentUser();

    IUserAccount[] acct = user.getSAPUser().getUserAccounts();

    String userUID = acct[0].getLogonUid();

    Regards

    Sidharth

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 15, 2004 at 12:28 AM

    ..what about?

    		IWDClientUser clnt =	WDClientUser.getCurrentUser();
    		String uniqName = clnt.getSAPUser().getUniqueName();
    

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      thanks,

      with the IUser, i'm able to get the correct userID, but that i'd already expect without the IUser-Workaround.

      Is this a bug in getUserClientID() in WD-standard classes?

      kr, achim

  • avatar image
    Former Member
    Jun 09, 2005 at 07:46 AM

    hi Joseph,

    Double click on the applcation and then go the application properties select new -> pre-defined value

    -> authentication -> set its value to true.

    regards

    Bharathwaj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 09, 2005 at 07:53 AM

    hi Joseph,

    I know that.. :).. No problem.. Thanks for the concern !

    Good day !

    Regards

    Bharathwaj

    Add comment
    10|10000 characters needed characters exceeded