Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 04 Jan 2009, 01:51
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Anyway to force a logout of all users?

I am having problems with a current mod and the only way to cure it at this point is to FORCE a user to logout and then have them relog back in. Rather than explain this to EVERY user there has gotta be an easier way of FORCING all users to logout or clear their cookies for the forum so that if they had the "REMEMBER ME" box checked they would still be required to login. Is there an SQL query or a template edit that I can run or change to make this happen?

OR even better if there is a way to change the actual TIME a user can stay logged in via the REMEMBER ME box. Like make it so that they can only stay logged in for 24 hours or however long I specify.
Reply With Quote
  #2  
Old 04 Jan 2009, 02:11
Rene Kriest Rene Kriest is offline
 
Join Date: Jul 2008
Real name: King René II
http://www.vbulletin.org/forum/showthread.php?t=163327
Reply With Quote
  #3  
Old 04 Jan 2009, 02:25
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Nice one thanks, I would like to have something to do ALL users at once. Just a complete logout of every user. So that way next time they visit the forum they are forced to login. Like I said I don't care if I gotta run a database query that's fine, someone just point me in the right direction
Reply With Quote
  #4  
Old 04 Jan 2009, 03:21
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Empty (truncate) the session table maybe?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 04 Jan 2009, 03:29
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Originally Posted by Lynne View Post
Empty (truncate) the session table maybe?
That would only kick users who haven't checked "Remember me" when they logged in.
__________________
Former vBulletin.org Staff Member

Please feel free to re-use any of the code in any of my projects submitted to vB.org, so long as original attribution is retained.
Reply With Quote
  #6  
Old 04 Jan 2009, 03:38
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Ah yes, you are right.

Change the cookie path or domain to something invalid? Of course, this is assuming you can then change it back via the database so you can get back in (or reset it with tools.php). I'm sure there must be a better way though.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #7  
Old 04 Jan 2009, 04:59
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Originally Posted by Lynne View Post
Ah yes, you are right.

Change the cookie path or domain to something invalid? Of course, this is assuming you can then change it back via the database so you can get back in (or reset it with tools.php). I'm sure there must be a better way though.
I was thinking this too but it doesn't work because when the user tries to login they automatically get logged back out as soon as they login.
Reply With Quote
  #8  
Old 04 Jan 2009, 05:00
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Real name: Jarvis
Restarting mysql and apache seem to do the trick pretty good for me
__________________
vBulletin Services and vBulletin Hosting
Reply With Quote
  #9  
Old 04 Jan 2009, 05:24
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Clear the cookies. You just set empty values to the "userid" and "password" cookies. However, I'm not sure how you would control this to only once without some messy workarounds (another cookie maybe?).
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
Reply With Quote
  #10  
Old 04 Jan 2009, 17:28
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Originally Posted by FRDS View Post
Restarting mysql and apache seem to do the trick pretty good for me
Tried this and it doesn't work.

Originally Posted by Dismounted View Post
Clear the cookies. You just set empty values to the "userid" and "password" cookies. However, I'm not sure how you would control this to only once without some messy workarounds (another cookie maybe?).
How would I be able to do this for every user without actually having access to their computer? Cookies are stored in their web browser.
Reply With Quote
  #11  
Old 04 Jan 2009, 19:22
Bellardia Bellardia is offline
 
Join Date: Jul 2007
Originally Posted by SnapOff Racing View Post
Tried this and it doesn't work.



How would I be able to do this for every user without actually having access to their computer? Cookies are stored in their web browser.
Since you're in control of the sever, you would make it write a new cookie to all users who try and connect to your site. Using the same variables as vbulletin you could overwrite the saved information, but he included the drawbacks as well.

This method would have to stay active until each logged in user has viewed the forums, and until then without additional coding no users could log in.

If you know about cookies you might be able to reset vbulletin's cookie and then use one to save the info when they try and log-in again.

Last edited by Bellardia; 04 Jan 2009 at 19:23. Reason: grammar
Reply With Quote
  #12  
Old 04 Jan 2009, 21:32
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Hmm is there possibly a piece of code that I could add to my index.php file so that when the user browses to that page the system will reset their cookies causing them to logout? Then along with that piece of code I could specify how long the user is allowed to stay logged in until they get logged out and have to log in agian... For example something like ...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #13  
Old 04 Jan 2009, 22:10
Medtech's Avatar
Medtech Medtech is offline
 
Join Date: Oct 2007
i restart my vps server, that clears everyone out
Reply With Quote
  #14  
Old 04 Jan 2009, 23:03
Bellardia Bellardia is offline
 
Join Date: Jul 2007
Originally Posted by SnapOff Racing View Post
Hmm is there possibly a piece of code that I could add to my index.php file so that when the user browses to that page the system will reset their cookies causing them to logout? Then along with that piece of code I could specify how long the user is allowed to stay logged in until they get logged out and have to log in agian... For example something like ...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
The problem with this is that every time a user views the page they will be forcefully logged out again. This is why a second cookie was suggested. You could change the countLogout time to some small period of time to ensure that they expire after a few hours, that way users could still use the forums, they'd just have to relogin every few hours until you're sure everyone has logged out.

If you have access to your whole sever, you could reset its stored sessions, which should log out all users.
Reply With Quote
  #15  
Old 04 Jan 2009, 23:20
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Originally Posted by Bellardia View Post
The problem with this is that every time a user views the page they will be forcefully logged out again. This is why a second cookie was suggested. You could change the countLogout time to some small period of time to ensure that they expire after a few hours, that way users could still use the forums, they'd just have to relogin every few hours until you're sure everyone has logged out.

If you have access to your whole sever, you could reset its stored sessions, which should log out all users.
I do have access to the entire server, it's sitting in the other room lol So how would I reset the stored sessions? I'm running Abyss Webserver and I don't recall seeing an option that your talking about in the Configuration Menu. Do I need to do this via MySQL or somewhere else?
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
No Logout for Banned Users akanevsky vBulletin 3.5 Add-ons 33 22 Nov 2007 19:49



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 23:28.

Layout Options | Width: Wide Color: