Log-out all users


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.


XenForo moderator
Staff member
I haven't tested this but changing the cookie prefix in library/config.php should do it.
$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.


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.


in memoriam 1991-2020
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.