Discrepency in Last Visit/Activity

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ocean
    Senior Member
    • Mar 2004
    • 839
    • 3.0.3

    Discrepency in Last Visit/Activity

    I have a discrepency. I'm looking at a particular user who was NOT logged in at the moment.

    Looking at the Member List, it shows their Last Visit was 5/24/2004. However, when I look at their Profile, it shows their Last Activity on 5/26/2004.


    What is causing this discrepency?



    p.s. I have disabled the "Remember Me" functionality - so it is not possible for a user to remain logged in indefinitely.
    echo $ocean_signature;

    ;)
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    The 'Last Visit' is actually their next-to-last visit. The Last Activity is the last time they were on your forums.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • Ocean
      Senior Member
      • Mar 2004
      • 839
      • 3.0.3

      #3
      Originally posted by Steve Machol

      The 'Last Visit' is actually their next-to-last visit. The Last Activity is the last time they were on your forums.
      Wow! Well, if that's true...


      1. That is incredibly backwards and confusing. Why not just call them "Last Visit" and "Next to Last Visit"?

      2. If what you say is true, than why is it that for the majority of my users, "Last Visit" and "Last Activity" coincide? If "Last Visit" means their next-to-last visit, than those two items should *never* agree. But most of the time, they do.

      3. If what you say is true, than what is the point of having "Last Visit" being the field shown on the Member List? Shouldn't it be "Last Activity"? And besides which, in the AdminCP/vB Options/User Listing & Profile Viewing/Member List Field Options, the option for what I presume is the "Last Visit" field is actually listed as Last Online. Doesn't that suggest that there is a problem somewhere?
      echo $ocean_signature;

      ;)

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        1, 2, and 3. I really don't know why it is set up this way. Sorry.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • Ocean
          Senior Member
          • Mar 2004
          • 839
          • 3.0.3

          #5
          Originally posted by Steve Machol

          1, 2, and 3. I really don't know why it is set up this way. Sorry.
          Well, at the very least, if Member List Field Options is showing that Last Online is the field that is being shown - and I have a user for whom that information is inaccurate - doesn't that suggest that there is a problem? Either a bug in vB or somewhere on my board?

          Between that, as well as the other discrepencies that I mentioned, it would appear that we need more information in order to know how to proceed. Especially since, at this point, we don't know if we're looking at a vB Bug, a problem on my board, or if what's happening is normal - and we just don't understand how it could be.


          If you are not familiar with the coding and design behind this issue, is it possible to ask a Dev to chime in here?
          echo $ocean_signature;

          ;)

          Comment

          • Ocean
            Senior Member
            • Mar 2004
            • 839
            • 3.0.3

            #6
            Bump?
            echo $ocean_signature;

            ;)

            Comment

            • Steve Machol
              Former Customer Support Manager
              • Jul 2000
              • 154488

              #7
              What exactly are you bumping this for? This is currently the way this works. There is no bug that I'm aware of.
              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
              Change CKEditor Colors to Match Style (for 4.1.4 and above)

              Steve Machol Photography


              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


              Comment

              • Ocean
                Senior Member
                • Mar 2004
                • 839
                • 3.0.3

                #8
                Originally posted by Steve Machol
                What exactly are you bumping this for? This is currently the way this works. There is no bug that I'm aware of.
                I'm bumping this, because there is a problem.

                Here are the possible scenarios:


                1. You are correct in your original statement, which means that "Last Visit" means next to last visit, and "Last Activity" means the actual last visit.

                Under this scenario - there is a problem because most of my users are coming up with Last Visit and Last Activity being identical. If your statement is correct, than they should NOT be identical. I should always see two different dates for all users. But I don't.


                2. You are incorrect in your original statement. This is possible because in the AdminCP/Member List Field Options, the field in the Member List is referred to as "Last Online".

                If this scenario is correct - than there is also a problem because I had a user for whom the "Last Online" date was NOT their last online date.



                So, regardless of whether your original explanation was correct or not - I still have a problem.

                Since you acknowledged that your knowledge in this part of the coding and design was lacking, I had asked if it was possible to have a Dev take a look at this thread and chime in.

                As that was two days ago, and I have heard neither from you, nor from anyone else, I bumped this thread.


                Where's the confusion?
                echo $ocean_signature;

                ;)

                Comment

                • Freddie Bingham
                  Former vBulletin Developer
                  • May 2000
                  • 14057
                  • 1.1.x

                  #9
                  Offhand, if the dates are the same then that means the user is currently logged out. If the dates are different then the user is logged in, their session has not yet expired, or their session did expire, with lastvisit being the last time the user visited, before the current session. The next time they visit, the lastvisit will be updated to the value of lastactivity. lastvisit is only updated on the first page view of a visit, or if the user manually chooses to logout.

                  The online status indicators work onf the premise that if the user's lastactivity was in the last 15 mins (default) and that lastvisit and lastactivityare not the same, then the user is online.

                  Try it out, logout and you'll see the two fields become equal to each other.

                  So yes, lastactivity, is the very last time the user was online.

                  Comment

                  • Ocean
                    Senior Member
                    • Mar 2004
                    • 839
                    • 3.0.3

                    #10
                    Originally posted by Freddie Bingham

                    Offhand, if the dates are the same then that means the user is currently logged out. If the dates are different then the user is logged in, with lastvisit being the last time the user visited, before the current session.
                    Hi, Freddie - thanks for popping in!

                    The problem is that for the incident I originally posted about - the user was NOT logged in. However, the dates were different anyway.

                    I was looking to see if any circumstances could allow that to happen normally - or if a problem or bug was indicated.
                    echo $ocean_signature;

                    ;)

                    Comment

                    • Ocean
                      Senior Member
                      • Mar 2004
                      • 839
                      • 3.0.3

                      #11
                      Originally posted by Freddie Bingham

                      lastvisit is only updated on the first page view of a visit, or if the user manually chooses to logout.
                      It looks like I initially responded to the first version of your post, before you edited it.


                      Okay, well, with your new information - here is the situation:


                      In this situation, the Last Visit was marked as 5/24/04, and the Last Activity was 5/26/04.

                      The user was NOT logged in at the time I witnessed this.


                      According to your statements, when this user logged in on 5/26/04 - their "Last Visit" value should have updated to 5/26/04 - but it didn't. It remained set to it's previous value - which was 5/24/04.

                      Am I correct in thinking that that is not what is supposed to happen?
                      echo $ocean_signature;

                      ;)

                      Comment

                      • Freddie Bingham
                        Former vBulletin Developer
                        • May 2000
                        • 14057
                        • 1.1.x

                        #12
                        The user didn't manually logout (press the logout link), they just went idle and so the lastvisit date wasn't updated. It would have been updated to that lastactivity date, the next time they visited the forum. The dates will only ever be the same if the user manually logs out. All working as designed though anything that refers to the user's last visit, should probably be looking at the lastactivity field.

                        Comment

                        • Ocean
                          Senior Member
                          • Mar 2004
                          • 839
                          • 3.0.3

                          #13
                          Originally posted by Freddie Bingham

                          The user didn't manually logout (press the logout link), they just went idle and so the lastvisit date wasn't updated.

                          I thought you said earlier that the "Last Visit" does update on the first page view of a visit. Did I misunderstand?




                          Originally posted by Freddie Bingham

                          It would have been updated to that lastactivity date, the next time they visited the forum. The dates will only ever be the same if the user manually logs out. All working as designed though anything that refers to the user's last visit, should probably be looking at the lastactivity field.

                          That being the case, is it possible somehow, for me to add a "Last Activity" column to the Member List, next to the "Last Visit" column? I assume doing so would not cause any issues with performance.
                          echo $ocean_signature;

                          ;)

                          Comment

                          • Freddie Bingham
                            Former vBulletin Developer
                            • May 2000
                            • 14057
                            • 1.1.x

                            #14
                            Yes, it updates to the current value of lastactivity, which was set in the PREVIOUS session. THEN lastactivity is updated to TIMENOW.

                            Your example user vists on 5/26/04.

                            We don't know what the lastvisit was, but we know lastactivity was 5/24/04. Lastvisit is updated to 5/24/04. Lastactivity is updated to TIMENOW (5/26/04) and continues to be updated as the user browses. User goes idle. Lastvisit = 5/24/04, lastactivity = 5/26/04. Users comes back 5/27/04, lastvisit now gets updated to 5/26/04 (current lastactivity), lastactivity to TIMENOW (5/27/04) and so on.. There is no bug in terms of the fields being updated as we designed them to be.

                            If the memberlist is looking at the lastvisit column to determine lastactivity then I'll change it, but I've already changed some of these and might have done this one already.

                            Comment

                            • Freddie Bingham
                              Former vBulletin Developer
                              • May 2000
                              • 14057
                              • 1.1.x

                              #15
                              Edit memberlist.php

                              look for:

                              PHP Code:
                              " . iif($sortfield=='lastvisit', " , IF((options $_USEROPTIONS[invisible]), joindatelastvisit) AS lastvisittime ") . " 
                              replace with
                              PHP Code:
                              " . iif($sortfield=='lastvisit', " , IF((options $_USEROPTIONS[invisible]), joindatelastactivity) AS lastvisittime ") . " 
                              look for:

                              PHP Code:
                              $userinfo['lastvisit'] = vbdate($vboptions['dateformat'], $userinfo['lastvisit'], true); 
                              replace with
                              PHP Code:
                              $userinfo['lastvisit'] = vbdate($vboptions['dateformat'], $userinfo['lastactivity'], true); 

                              Comment

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