Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to LOG OUT all active logged in users in php from admin side

I want to add something like Logout all active Logins in to my system from administrators

I have some case when Admin changes in permission of users , I am storing permissions in SESSION ,

So I want to make log out all the users when ADMIN Press event

Something like in Google we have option that log out from other devices.

one way I can find that I can set one GLOBAL variable and every time I will check it when I fire AJAX in every 1 min after log-in

is there another way to do this which is more standard .

like image 839
Chintan Gor Avatar asked Sep 09 '14 09:09

Chintan Gor


1 Answers

you should identify where the user's sessions are stored. If your web server is using files (see your php.ini) then deleting this files will make a brutal destroy of all the user's sessions.

like image 61
C.Vergnaud Avatar answered Sep 27 '22 22:09

C.Vergnaud