Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Logout help

  1. #21
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    They use the same method, but with a much longer logout delay -- such as ten or fifteen minutes. If the user hasn't requested another page within that time, they're said to be inactive.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #22
    Join Date
    Feb 2006
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Right but theres no frames that refresh and reset the users lastseen, so on every page, the users lastseen is updated, and then at the same time their time is checked against now. So no matter what they're considered always online. How do you make it so that they're logged off after 15 minutes of not going to a different page?

    Sorry if my question makes no sense.

  3. #23
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    the users lastseen is updated, and then at the same time their time is checked against now.
    You have to check their time against now whenever another user accesses a page as well, not just when they do. Basically, every time a page is requested by anyone, member, guest, whatever, you have to go through a list of the users considered online, check their lastseen against now, and update their status appropriately.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #24
    Join Date
    Feb 2006
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OHHHHH!
    I get it now hahaha.
    Allright well how would i check one user's time when a different user accesses a page? Do i check every single users Lastseen against NOW() everytime a page is accessed?

    That would make sense to me.

  5. #25
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Do i check every single users Lastseen against NOW() everytime a page is accessed?
    You only need to check the users that are logged in, and obviously there's no need to check the user who made the request, as you've pointed out above.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #26
    Join Date
    Feb 2006
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Right.
    Well, awesome, i finally get it!
    Thanks Twey.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •