on 12-14-2004 4:20 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have same problem and when I turn on authentication in the Applications propreties, I get a second login screen displayed in the portal main frame (Please not I'm logged in into the portal already!). If I try to login with my portal credentials nothing happens, the login screen does NOT disappear. Wrong credentials give a login error as expected.
Portal and J2EE engine are on the same machine, is there anything in the portal configuration to be done?
By the way I see this misbehavior in other areas of the J2EE engine and portal as well. For example when i go to the J2EE engine start page and try to get into User Management, I also get a login screen, that does not disappear.
What is the missing link here?
Frank
hi Joseph,
I know that.. :).. No problem.. Thanks for the concern !
Good day !
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
..what about?
IWDClientUser clnt = WDClientUser.getCurrentUser();
String uniqName = clnt.getSAPUser().getUniqueName();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.