• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Log-out all users

#1
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
#2
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
#3
^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
#5
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
#6
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
#8
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.