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

XF 1.2 Last Seen Question

Discussion in 'XenForo Questions and Support' started by Amaury, Jun 22, 2013.

  1. Amaury

    Amaury Well-Known Member

    Note: this is on any version, but it wouldn't let me leave the prefix blank.

    Okay, so by default, after 15 minutes of inactivity, users disappear from the Members Online Now section and Current Visitors page. However, their last location still shows for a while before disappearing.

    For example, "Amaury was last seen: Viewing forum list, 59 minutes ago." After another minute, it'll change from X minutes ago to Today at X (or Yesterday at X if it's close to the next day already), which stays there for a while and then disappears.

    Usually I notice that their last location disappears anywhere after an hour and 30 minutes or two hours have passed. However, sometimes I've noticed it disappear only a little after an hour has passed. So what exactly does this depend on?
     
  2. Jeremy P

    Jeremy P Well-Known Member

    If they logout manually it will disappear immediately. If they don't logout and just close the tab then it will display the prior until a certain time has lapsed.
     
  3. Amaury

    Amaury Well-Known Member

    Yeah, I'm talking about just closing the browser or tab and not logging out. That's what I'm asking. What determines how long their last location shows, as it seems to vary?
     
  4. Mike

    Mike XenForo Developer Staff Member

    When the record gets cleaned up by the cron task mostly (hourly).
     
  5. Amaury

    Amaury Well-Known Member

    Mostly, huh? So there's like sometimes a delay is what you're saying?

    Like I said, it usually disappears anywhere between an hour and 30 minutes and two hours of total inactivity, and rarely it disappears only like 10 minutes after an hour has passed. However, you're saying it should technically disappear when it's been one hour and we shouldn't see that "Today / Yesterday at X"?

    For example, this...

    • Amaury was last seen: Viewing forum list, 59 minutes ago
    • Amaury was last seen: Viewing forum list, Today at 11:12 AM

    ...should technically be this:

    • Amaury was last seen: Viewing forum list, 59 minutes ago
    • Amaury was last seen: Today at 11:12 AM
     
  6. Mike

    Mike XenForo Developer Staff Member

    It's not really a particular "should". If the task runs once and hour and the clean up only happens when the record hasn't been touched for an hour, then it'll be removed between 1 and 2 hours (approximately) after the last page load. So basically, after 60 minutes it can disappear at any point but for the general case, it's not deterministic.
     
    Amaury likes this.
  7. Amaury

    Amaury Well-Known Member

    Gotcha.

    So if my last activity were at 1:00 PM, for example, and it's been 59 minutes, it would be like this:

    "Amaury was last seen: Viewing latest content, 59 minutes"

    It then would be one of the following scenarios when it's been one hour:
    • "Amaury was last seen: Today at 1:00 PM"
    • "Amaury was last seen: Viewing latest content, Today at 1:00 PM," which could go as far as around 3:00 PM (two hours approximately) before disappearing

    Also, while I do understand the gist of it now, what exactly do you mean by "the clean-up only happens when the record hasn't been touched for an hour" and "after the last page load"?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    The last activity by the member.
     
    Amaury likes this.
  9. Amaury

    Amaury Well-Known Member

    Is that answering both questions here or just one?

     

Share This Page