Displays a list of online users on the website
Download the package from the manager of your site.
How to download?
Автор дополнения
Version 0.1.0-rc2
Release date 03.28.2016
Downloads 116
Views 2 228
Warning! This package requires MODX not less than 2.3 !
A simple component that allows you to answer the questions «How can I see the date of the last occurrence of the user?» or «How to see who is online?».

  1. It fixes the date of the last occurrence of each user (in all contexts).
  2. Displays a list of users online on the site.
  3. Resets the authorization of disabled and blocked users.

Fixing the date of occurrence of the user

To do this, use the UserOnline object, which records:
  • User ID
  • Current Context
  • Occurrence Date
The appearance of the user in the context of mgr is also fixed. To disable this, set the system configuration of usersonline_mgr_check в «No».

List of online users

This task uses the [[!UsersOnline]] snippet, which is a wrapper over pdoUsers.
Its own parameter is one: &contexts — a list of contexts separated by commas, in which users are checked. Default is empty — check in all contexts.
The time during which the user is considered to be on the site is specified in the system configuration of usersonline_time_span in seconds. The default is 900.

As it is based on pdoUsers, it deals with the design of the results. Accordingly, all the parameters specified in the [[!UsersOnline? ]], will be passed to pdoUsers as a whole.

Authorization reset to blocked users

Another problem encountered — after blocking the user can do anything on the site, while his session is alive. The plugin checks if the current user is active. If it is blocked or disabled, the access rights will be restarted, after which the carefree life of the offender will end.

Discuss it in MODX.PRO community.


  • Added: timeInterval parameter for getOnlineUsers.


  • Added: The call of /security/logout/ processor for inactive, banned users.
  • Added: Redirect to main page after /security/logout/ processor's call.


  • Initial release.