Hi,
How can I force all online users to log out or how can I log out all online users ?
Regards,
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Jerome Bakker@jeabakker
Jerome Bakker - 1 like
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
You must log in to post replies.You can take this code.
Just foreach() the online users and apply the mentioned code, e.g.:
@Nikolai
That wouldn't work as the session (and session manager) only apply to the logged in user. There is no way that those services can touch other sessions (luckily).
@Hermand
What is your goal? If you wish to perform some maintenance to the server and don't want to have any users only. Simply enable Maintenance mode from the admin side.
With a bit of programming you can truncate the users_sessions table and therefor nobody will be logged in anymore (maybe also truncate the users_remember_me_cookies table to not automatically let users log back in who have Remember me enabled)
@Jerome I assumed this
@jeabakker and @rivervanrain thanks a a lot I will simply enable Maintenance mode from the admin side.