Force Logout
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
This is an initial of Force logout module.
Sometime when you plan to migrate to new database you know that you have to stop all users from updating the DB while you're migrate the DB and in the same time you don't want to close your site in "maintenance mode" because you want to allow visitors to read content. so that's mean you're really need this module.
Drush commands to get this module work is:
1. drush en force_logout To enable this module.
2. drush vset force_logout_status 1 To enable force logout feature.
3. drush role-add-perm 'authenticated user' 'bypass force logout' to execlude specific user role from being force logout. Of course you should change 'authenticated user' to the role you want them to bypass force logout.
Now this module is enabled and will force logout all users that does not have this permission.
Try it out on simplytest.me.
Note: This module coming with settings page (admin/config/development/force_logout) and permission where you can bypass some user roles from being force logged-out.
#Performance Note: While this module using hook_init() it is highly recommended that you disable this module immediately if you are not using it.
Similar Projects:
- Read only mode: It prevents node add/edit but it won't logout users.
#Todo List:
- [✓]
[Add settings page so the admin can enable and disable the force logout feature.] - [✓]
[Add permission that allow some user roles to login while this feature is enabled.] - [ ] Redirect to specific URL when user trying to login, instead of just showing message.
- [✓]
Add custom button to empty sessions table except current user and TRUNCATE sessions table. - [ ] Change the way relaying on hook_init to just TRUNCATE sessions and prevent logged-in instead of working in hook_init to logout current logged-in users.
- [ ] Force logout specific session or specific user. It might be hook_menu in user page as tab so admin can click (Force logout this user) if he has already saved session.
