on 01-11-2008 8:58 AM
Hi ALL,
When i try to capture all the portal login id to a report using the following code
IUser epUser = null;
String portalUser = "";
try {
IWDClientUser user = WDClientUser.getLoggedInClientUser();
epUser = user.getSAPUser();
portalUser = epUser.getUniqueName();
}
} catch (Exception e) {
}
or even
IWDClientUser user = WDClientUser.getCurrentUser();
It is giving me this output in my report
USERID
93
93
93
93
if i give authentication = true, it asks for a login. and if i enter with a "administrator' login, it gives me
USERID
administrator
administrator
administrator
How can i get all the portal login id? Why number is reflecting instead of ID's?
Regards,
Divya
answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi u can write the following code in init() of Component controller
IWDClientUser wduser;
try
{
wduser=WDClientUser.getCurrentUser();
Iuser user=wduser.getSAPUser();
if(user!=null)
try
{
IUserAccount acct[]=user.getUserAccounts();
if(acct[0]!=null)
{
String userid=acct[0].getLogonUid();
}
}
catch(UMException e1)
{
e1.printStackTrace();
}
}
catch(WDUMException e)
{
e.printStackTrace();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Divya,
The below code is working for me. You can try with this: This is for currently logged in User.
String userName = "";
IWDClientUser wdUser = null;
try
{
wdUser = WDClientUser.getCurrentUser();
}
catch (WDUMException e)
{
wdComponentAPI.getMessageManager().reportException(e.getLocalizedMessage(), false);
}
IUser usernam = wdUser.getSAPUser();
userName = usernam.getUniqueName();
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanx for the reply.The userid is retrieved. But it is shown only if we give"Authentication=true". If i give authentication="False', it gives me "500 internal Server Error". So is it that we have to give Authentication=true".
Also...is it possible to retrieve to trace using webdynpro Java the userIds of all the users who all have logged in the portal "Today". Please help in this issue.
Regards,
Divya
Hi,
Real time you don't get "500 internal Server Error" because the user access this application through portal. So WDClientUser.getCurrentUser() always returns logged in user.
I am not sure about APIs for this requirement the userIds of all the users who all have logged in the portal "Today". But there are some reports called "Activity reports" in Portal.These reports provide various metrics about user activity details. Check whether these reports are of any use. Right now I don't have access to the portal otherwise I would have provided you more details.
regards,
Siva
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.