List Active Users That Are Logged In

2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 21, 2012   (RSS)

Re: [nmsinc] List Active Users That Are Logged In

By Jason - February 21, 2012

Hi,

There isn't a specific PHP function that would do this. Users are logged in using sessions, which is specific to a particular computer & browser while the user is logged in.

This can be accomplished with some customization of the website membership plugin. We could add a field to the user account section called "Last Activity" This would update with the date/time of the currently logged in user every time they perform an action on the site. You can then set a threshold of how many minutes you want to allow a user to be idle before considering them "offline" (this handles an instance when a user doesn't log out, but they have left the site). So, for example, you could say that a user must have done something (even just refreshed a page) every 10 minutes to be considered "online". You can then use this field and threshold to find all the users who currently have a "Last activity" time within your threshold.

If you are interested in having this build, please email consulting@interactivetools.com and we can go over the details.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/