Logout questions?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Das]-[
    New Member
    • Aug 2000
    • 19

    Logout questions?

    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
    Lady Moderator
    • Jun 2000
    • 2504

    #2
    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]

    Comment

    • Mike Sullivan
      Former vBulletin Developer
      • Apr 2000
      • 13327
      • 3.6.x

      #3
      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.

      Comment

      • Das]-[
        New Member
        • Aug 2000
        • 19

        #4
        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

        Comment

        • Mike Sullivan
          Former vBulletin Developer
          • Apr 2000
          • 13327
          • 3.6.x

          #5
          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)

          Comment

          • Das]-[
            New Member
            • Aug 2000
            • 19

            #6
            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

            Comment

            • Mike Sullivan
              Former vBulletin Developer
              • Apr 2000
              • 13327
              • 3.6.x

              #7
              the session table :D

              Comment

              • Das]-[
                New Member
                • Aug 2000
                • 19

                #8
                Ed: but if you close your browser window how the script does not execute and connect to the database.. so how is this done?

                Comment

                • Mike Sullivan
                  Former vBulletin Developer
                  • Apr 2000
                  • 13327
                  • 3.6.x

                  #9
                  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)

                  Comment

                  • Das]-[
                    New Member
                    • Aug 2000
                    • 19

                    #10
                    $cookietimeout <--- where is this variable declared ? in the script? in the config? in the cookie?

                    Comment

                    • Mike Sullivan
                      Former vBulletin Developer
                      • Apr 2000
                      • 13327
                      • 3.6.x

                      #11
                      In the admin script.

                      Comment

                      • Das]-[
                        New Member
                        • Aug 2000
                        • 19

                        #12
                        hmmm.. ok will look thanks for the help ed.. I'll be back if I need more help :)

                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...