cancel
Showing results for 
Search instead for 
Did you mean: 

Current logged users in portal

Former Member
0 Kudos

Dear All,

Can anybody help me, how to get the current logged users and its details of users in portal.

Thanx in Advance,

VenkatRamana.

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member
0 Kudos

Hi Venkata Ramana,

As per my knowledge there is no such standard application to get all the logged in user. But if you want this functionality you can modify the Login page and Logoff page. like when even the user saves the Logs in sucessfully store the user ID in a seperate database table. this can be done in the Login

page.. and when ever the user loggs of the the stored user id in the seperate database table should be deleted . this can be done in the master head Log-Off component.

Best Regards,

Raju Bonagiri

Former Member
0 Kudos

And this doesn't cover people who just close the browser etc...

Former Member
0 Kudos

Hi Venkata Ramana,

As per my knowledge there is no such standard application to get all the logged in user. But if you want this functionality you can modify the Login page and Logoff page. like when even the user saves the Logs in sucessfully store the user ID in a seperate database table. this can be done in the Login

page.. and when ever the user loggs of the the stored user id in the seperate database table should be deleted . this can be done in the master head Log-Off component.

Best Regards,

Raju Bonagiri

Former Member
0 Kudos

Hi Venkata Ramana,

As per my knowledge there is no such standard application to get all the logged in user. But if you want this functionality you can modify the Login page and Logoff page. like when even the user saves the Logs in sucessfully store the user ID in a seperate database table. this can be done in the Login

page.. and when ever the user loggs of the the stored user id in the seperate database table should be deleted . this can be done in the master head Log-Off component.

Best Regards,

Raju Bonagiri

Former Member
0 Kudos

hi,

create WD application with following code :-

Required jar files for this code snippet

-> webdynpro_services.jar located at <plugins folder>\com.sap.tc.webdynpro.runtime\lib

-> com.sap.security.api.jar located at <plugins folder>\com.sap.security\lib

import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;

import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;

IWDClientUser currentUsers[] = WDClientUser.getClientUsers();

//Displaying the count of logged on users

wdComponentAPI.getMessageManager().reportSuccess("Number of logged on Users in the portal"+currentUsers.length);

for(int i = 0; i < currentUsers.length; i++)

{

if(currentUsers<i>.getSAPUser() != null)

{

//Displaying the logged on users;

wdComponentAPI.getMessageManager().reportSuccess("User - "+currentUsers<i>.getSAPUser().getUniqueName());

Regards

Jigar Oza

Former Member
0 Kudos

Actually the number of users of the Web Dynpro runtime, which might be different to portal users plus doesn't allow for multiple dispatchers and/or servers...

How about we find what the person wants the information for? For example, if it's for historical reasons, then the portal activity report might be useful.

Former Member
0 Kudos

Hi Venkat,

You need to create a portal application to get the logged in user.

Below is the code to get the login Id os User.

String _pmfKey = null;
			IPortalComponentRequest componentRequest =
				(IPortalComponentRequest) getRequest();
			IUserFactory userFactory = UMFactory.getUserFactory();
			IUser myUser =
				userFactory.getUser(componentRequest.getUser().getUniqueID());
			_pmfKey = myUser.getName();

please revert if you require more info

Regards

Narendra

shaila_kasha
Contributor
0 Kudos

Hi Venkat Ramana,

Portal Provides an Option of Portal Activity Report which shows the Logged in Users and the time.

It can be found at Portal Login at System administration Role, Monitoring-> Activity Report.

This also depends on the SP stack of your netweaver.

Else if you just need Current Loged user then look at the below links.

For SP7 this is not supported any more (even from Sp2 P25 on and from NW04 SPS4 on), see SAP note 762004 as well as http://help.sap.com/saphelp_nw04/helpdata/en/f0/94a340fa432b54e10000000a1550b0/frameset.htm

For lower patch levels, see this thread

Hope these links were helpful.

Regards,

Shaila

Former Member
0 Kudos

Hi,

If you can develop a webdynpro java application.Then you can follow this procedure to develop an application to fetch the details of currently logged on users

Follow this link:

https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/check%252ball%252busers%252bwho%252bhave%2...

Then you can integrate your webdynpro application in the portal by creating an iview.

Hope it helps.

Regards.

Rajat

former_member192434
Active Contributor
0 Kudos

Hi

check these forum links

thanks

Former Member
0 Kudos

Asked many times! The bottom line is that it is difficult to know, as the portal is basically stateless. The real time collaboration part of KM keeps track of this, but apart from that you will have problems finding the information.

What are you planning to do with the information?