[opencms-dev] Is a user logged in?

Andy Savin A.D.Savin at bath.ac.uk
Mon Jul 7 11:05:15 CEST 2008


Hi

> Thank you very much for fast answering my question.
> I want to delete a user from outside the Workplace, so I am looking for a
> API function to see, if a user is actually logged in or not.

You can use the isGuestUser method of the CmsUser object.  It returns true
the user isn't logged in.

Once you have your CmsObject you can do the following to get the current
user:

CmsUser loggedinuser = cmsObject.getRequestContext().currentUser();

Regards,

Andy

>
> karl
>
>
> Carl Alex Friis Nielsen wrote:
> >
> > Administration View >  Workplace Tools >  Broadcast
> > will give you a list of currently logged in users
> >
> >> -----Original Message-----
> >> From: opencms-dev-bounces at opencms.org
> >> [mailto:opencms-dev-bounces at opencms.org]On Behalf Of aden
> >> Sent: Monday, July 07, 2008 1:50 AM
> >> To: opencms-dev at opencms.org
> >> Subject: [opencms-dev] Is a user logged in?
> >>
> >>
> >>
> >> How I can get informations, if a user is actually logged in
> >> or not? This info
> >> I need before I can delete this user.
> >>
> >> karl
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Is-a-user-logged-in--tp18308024p18308024.html
> >> Sent from the OpenCMS - Dev mailing list archive at Nabble.com.
> >>
> >>
> >> _______________________________________________
> >> This mail is sent to you from the opencms-dev mailing list
> >> To change your list options, or to unsubscribe from the list,
> >> please visit
> >> http://lists.opencms.org/mailman/listinfo/opencms-dev
> >>
> >
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please visit
> > http://lists.opencms.org/mailman/listinfo/opencms-dev
> >
> >
>
>




More information about the opencms-dev mailing list