View Full Version : Logout All Users
ChrisMT
06-28-2011, 02:24 PM
Hi is there a plugin (or just a script) for vB4 that I can run that will logout all the users who are currently logged in? I appreciate your help. Thanks.
Adrian Schneider
06-28-2011, 03:43 PM
This should do the trick,
$vbulletin->db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "session");If you wanted to make it a PHP file...
logeveryoneout.php
<?php
error_reporting(E_ALL ^ E_NOTICE ^ 8192);
require('./global.php');
if (!is_member_of($vbulletin->userinfo, 6)) {
print_no_permission();
}
$vbulletin->db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "session");
echo 'Done';
BadgerDog
09-10-2012, 10:16 AM
This should do the trick,
$vbulletin->db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "session");If you wanted to make it a PHP file...
logeveryoneout.php
<?php
error_reporting(E_ALL ^ E_NOTICE ^ 8192);
require('./global.php');
if (!is_member_of($vbulletin->userinfo, 6)) {
print_no_permission();
}
$vbulletin->db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "session");
echo 'Done';
My apologies for bumping an old thread, but I'm not a programmer, so I thought I would ask.
I have one user stuck on permanent login. It happens to be the very first one showing in the "Who's On-line" list. What would be the code above for the PHP file if I only wanted to force logout one (1) userid?
I'm running 4.1.3pl5 ...
Thanks for any feeback.. :)
Regards,
Doug
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.