View Full Version : Logout questions?
Das]-[
Wed 9th Aug '00, 11:58pm
I really love this script so far, and can't wait to release it on my website. I do have a question. I am intergrating my entire site based on VBulleting codes of sessions.
What I don't understand is what happens if the user logs in, and closes the browser or is away for let's say a day. If he comes back in a few hours , is he still logged in or does he have to relogin. I did notice that the expiry on cookies set is Year 2020.
Please answear as soon as possible.
Thank You
Dominik
Me2Be
Thu 10th Aug '00, 12:20am
You are still cookied in for as long as the cookie is active. But you are counted as logged off automatically when you are gone in XXXX seconds (based in CP). At least that's how it works on my board.
(I believe that is correct - guys?)
[Edited by Me2Be on 08-09-2000 at 11:21 PM]
Mike Sullivan
Thu 10th Aug '00, 2:12am
Well, if you set your profile to store the cookie, then you will NEVER be logged out.
Otherwise, it just sets a session cookie.
What Me2Be is referring to is the lastvisit section of your cookie - this is only updated every so often, so posts will stay new.
Das]-[
Thu 10th Aug '00, 4:14pm
Ok I knew that. I don't think there is an option to disable cookies because this is the only way vBulletin keeps sessions. I scrambled through the entire code and notice that only two cookies are set: bbuserid which is the user id that is recognized with your database entry, and bbuserpassword which I really don't think is needed. What I am saying is that both cookies have expiry date of Year 2020. So how does the script possibly recognize that the session is closed when let's say you close your browser. Please point me to the script that does this, because I think youre wrong.
Thank You
Dominik
Mike Sullivan
Thu 10th Aug '00, 6:36pm
BTW, there's actually 4 possible cookies:
bbuserid
bbpassword
bblastvisit
bblastactivity
Well, looking around it appears that it will store the userid and password (encrypted) regardless. However, if you don't cookie, it'll just automatically set
$bbpassword="";
The script does a check if ($bbpassword) { and will fill in the username/password if $bbpassword is set.
It's done this way so after you update your profile, will will NEVER have to log in again :D (well, you shouldn't - haven't tested this theory)
And I was a little off with what I was saying before - it doesn't use sessions - it MIMICKS them :D
(Actually... hmm... I confused myself. Continue amongst yourselves)
Das]-[
Thu 10th Aug '00, 6:39pm
Thanks for the reply but still doesn't answear my original question. :(
If you don't logout, where in the script does it confirm that your session has expired? If the cookies are set to expiry date of year 2020
Mike Sullivan
Thu 10th Aug '00, 6:41pm
the session table :D
Das]-[
Thu 10th Aug '00, 6:48pm
Ed: but if you close your browser window how the script does not execute and connect to the database.. so how is this done?
Mike Sullivan
Thu 10th Aug '00, 6:58pm
The session table is automatically cleared when the lastactivity time and current time {time()} have a greater difference than $cookietimeout
So basically - it doesn't care if you close the browser window. If you immediately come back, you'll still be logged in...
(hmm... :( Have to talk to John about that)
Das]-[
Thu 10th Aug '00, 7:08pm
$cookietimeout <--- where is this variable declared ? in the script? in the config? in the cookie?
Mike Sullivan
Thu 10th Aug '00, 7:10pm
In the admin script.
Das]-[
Thu 10th Aug '00, 7:12pm
hmmm.. ok will look thanks for the help ed.. I'll be back if I need more help :)
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.