ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

last visit date does not get updated after logging in

October 09, 2012 6:09am

Subscribe [2]
  • #1 / Oct 09, 2012 6:09am

    Est Digital

    62 posts

    last visit date does not get updated after logging in (both system login and safecracker login)

    EE v2.4.0 - Build: date 20120123
    Safecracker 2.1

  • #2 / Oct 10, 2012 4:41pm

    Kevin Smith

    4784 posts

    Hi Kees,

    Could you expand on this a bit more? I’m not sure I know exactly what you’re referring to here.

  • #3 / Oct 22, 2012 2:37am

    Est Digital

    62 posts

    On the members > view all; page there’s a last visit column. But the date in there doesnt update after logging in the system or safecracker login.

    I logged in right now (22 oct 8:36) but the screen says 18 oct.

    tested with superadmins and members

    http://kees-tm.nl/media/uploads/Screen22-10-2012-8.33.39.jpg

  • #4 / Oct 23, 2012 2:43pm

    Dan Decker

    7338 posts

    Hi Kess,

    I have confirmed your experience. For me, the date was from my last activity yesterday afternoon.

    I’m not entirely sure what event should trigger an update to that value, so I’m taking this to the Engineers for a clear answer.

    Cheers,

  • #5 / Oct 24, 2012 10:17pm

    Dan Decker

    7338 posts

    Hi Kees Internet,

    I head back from the Engineers and they pointed me to this explanation:

    ExpressionEngine internally uses two variables to keep track of user visits: last_activity and last_visit.  The last activity time is updated every five minutes as long as the user is active (navigating the site).  Last visit is only updated if the user has been gone for more than two hours*.  Additionally, the value that it takes on is not the current time, but rather the time that the user left.

    So let’s assume it’s my first visit to the site - at this point I don’t have a last visit time yet:

    1. 8:14 - update last activity (8:14)
    2. 8:19 - update last activity (8:19)
    3. 8:24 - update last activity (8:24)

    Now I leave the site for a few hours (days, weeks…) and come back shortly after 11 o’clock:

    1. 11:02 - update last visit (8:24), update last activity (11:02)
    2. 11:07 - update last activity (11:07)

    Keeping that difference in mind, the difference between the control panel and the member list becomes a matter of semantics.  The member list uses the last activity value, whereas the control panel shows the last visit value.

    * This time is determined by the session length.  By default, this is two hours on the frontend and one hour for the control panel.

    Kinda wonky, but that’s the logic behind when that value is updated.

    Let me know if you have any questions!

    Cheers,

  • #6 / Oct 25, 2012 1:29am

    Est Digital

    62 posts

    Thanks for the research and great explanation.

  • #7 / Oct 29, 2012 9:54am

    Kevin Smith

    4784 posts

    Anything else we can help with, Kees?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases