Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18954

Last_visit_timestamp from ezuservisit table fails to keep the right records

    XMLWordPrintable

Details

    Description

      When trying to verify the database for the number of logins, in the last step , the returned query only shows 2 logins_cont for testuser2

      Steps to reproduce
      Setup - Create two test users
      1. Log in as admin in admin2
      2. Click on "User accounts" in the top tab menu
      3. Click on the "Administrator users" group in the left tree menu
      4. Select "User" in the content class dropdown
      5. Click on "Create here"
      6. Fill in the user object values:
          First name: "test user"
          Last name: "one"
          username = "testuser1", 
          password = "publish"
          email = “testuser1@ez.no”
      7. Click on "Send for publishing"
      8. Repeat steps 4 to 7, replacing the following values:
          Last name: "two"
          username = "testuser2"
          email = "testuser2@ez.no"
      9. Clean the User’s visit table
      10. Access mysql 
          $ mysql -u ezp -p ezp
      11. Clean ezuservisit table
          mysql > delete from ezuservisit;
      12. Change System date to current date - 2 days
      Change date from linux (this must be done with root permissions):
          $  sudo  date +%Y%m%d -s "Current date - 2 days"
          (example: is today is 2011/04/13, the command stays:
          sudo  date +%Y%m%d -s "20110411"
      13. Now you have to touch all the files inside .run/ to the previous date and time, by running the following command.
      find . -exec touch '{}' ';'
      
      Login/logout from ezpublish 2 days previous to check
      1. Login/logout 1 times as testuser1
      
      Change System date to current date- 1 day
      1. Change date from linux (this must be done with root permissions):
          $  sudo  date +%Y%m%d -s "Current date - 1 day"
          (example: is today is 2011/04/13, the command stays:
          sudo  date +%Y%m%d -s "20110412"
      
      Login/logout from ezpublish  1 day previous to check
      1. Login/logout 1 times as testuser1
      2. Login/logout 2 times as testuser2
      
      Verify that the users last_visit_timestamp appear on the query’s result
      1. Access mysql 
          $ mysql -u ezp -p ezp
      2. Execute the following query in mysql:
          mysql> SELECT user_id, login_count FROM ezuservisit where last_visit_timestamp > unix_timestamp(now())-86400;
      3, Verify that the returned results are:
          2 logins_cont for testuser1
          2 logins_cont for testuser2
      
      Change System date to current date
      1. Change date from linux (this must be done with root permissions):
          $  sudo  date +%Y%m%d -s "Current date"
          (example: is today is 2011/04/13, the command stays:
          sudo  date +%Y%m%d -s "20110413"
      
      Verify that the users last_visit_timestamp appear on the query’s result and that Testuser1 only appears with 1 login_count;
      1. Access mysql 
          $ mysql -u ezp -p ezp
      2. Execute the following query in mysql:
          mysql> SELECT user_id, login_count FROM ezuservisit where last_visit_timestamp > unix_timestamp(now())-86400;
      
      Verify that the returned results are:
          1 logins_cont for testuser1
          2 logins_cont for testuser2
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            pedro.resende pedro.resende
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: