Free
Download the package from the manager of your site.
How to download?
How to download?
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?».
Functions:
Fixing the date of occurrence of the user
To do this, use the UserOnline object, which records:
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.
Functions:
- It fixes the date of the last occurrence of each user (in all contexts).
- Displays a list of users online on the site.
- 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
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.
0.1.0-rc2
- Added: timeInterval parameter for getOnlineUsers.
0.1.0-rc1
- Added: The call of /security/logout/ processor for inactive, banned users.
- Added: Redirect to main page after /security/logout/ processor's call.
0.0.1-beta
- Initial release.