Log-out all users

Hi!

The question is simple, we need a way to log out all the users currently signed in and remembered.
I tried removing the session rows from the xf_session table but it didn't work.

Any leads on this would be great, thanks.
 

Brogan

XenForo moderator
Staff member
I haven't tested this but changing the cookie prefix in library/config.php should do it.
Code:
$config['cookie'] = array(
'prefix' => 'yourprefix_',
'path' => '/',
'domain' => ''
);
Why do you need to force log out for all of the members?
 

Jake Bunce

XenForo moderator
Staff member
^agree with Brogan

Note that the default cookie prefix is 'xf_' so you need to use something different. That will invalidate all existing login and "remember me" cookies thereby forcing everyone to login again.
 

Deepmartini

Well-known member
Is there an addon which the admin can use to force a member to logout? That way if you have someone disrupting your site, you can force logout (and ban them?). Or maybe just log them out for 24 hours. I didn't see this anywhere in the control panel so not sure if this is an option.
 

Jeremy

Well-known member
The only option you have is to temporary ban them, you can invalidate the cookies, but that'll only work once.
 

Jeremy

Well-known member
I see no reason for one, just temporarily ban the user. You could in theory just invalidate his password; but that'd require him/her to be logged out before visiting your site.
 

NeoCHI

Active member
I don't see this line anywhere in library/config.php anymore:
'prefix' => 'yourprefix_'​
How can I logout all users now?
 
Top