[opencms-dev] Users currently Online feature?

Thomas M�rz thomasmaerz at gmx.de
Tue Sep 21 16:29:51 CEST 2004


Kevin Hyde <KevinH at mckenzieseeds.com> writes:

> When I'm logged on as either an administrator or projectmanager, is there a
> feature to see who else(i.e. editors, etc) is currently logged in?

This code works only for admin users.
The problem is, that JSPs using this code are not accessible to normal
users, although they could have an ACL to view the page.

| Vector users = cmsObject.getLoggedInUsers();
| for ( int i = 0; i < users.size(); i++ )
| {
|     Hashtable userInfo = ( Hashtable ) users.get( i );
|     // userInfo.get( I_CmsConstants.C_SESSION_USERNAME);
| }

> I'm using OpenCMS 5.x.

Tested with 5.3.6, but found just this code in 5.0.1:
So it should work.

,----[ com.opencms.file.CmsObject ]
| /**
|  * Returns a list of all currently logged in users.
|  * This method is only allowed for administrators.
|  */
| public Vector getLoggedInUsers() throws CmsException {
`----

Thomas




More information about the opencms-dev mailing list