Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-10532

lastlogin is not updated when a user logs in for the first time

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8, 2.2
    • None
    • Authentication
    • MOODLE_18_STABLE, MOODLE_22_STABLE
    • Hide

      1/ Create new user using Admin > User > Add a new user
      2/ Examine the last login value from the db, e.g. SELECT username, lastlogin FROM mdl_user WHERE username = 'newuser'; (it will be zero)
      3/ Login as the new user
      4/ Examine the last login value from the db (it is still 0) e.g. SELECT username, lastlogin FROM mdl_user WHERE username = 'newuser'; (it will be zero)
      5/ Logout as the new user
      6/ Examine the last login value from the db (it is still 0) e.g. SELECT username, lastlogin FROM mdl_user WHERE username = 'newuser'; (it will be zero)
      7/ Login as the new user again
      8/ Examine the last login value from the DB - it is now set.

      Expected result:
      Last login value is updated a stage 4

      Show
      1/ Create new user using Admin > User > Add a new user 2/ Examine the last login value from the db, e.g. SELECT username, lastlogin FROM mdl_user WHERE username = 'newuser'; (it will be zero) 3/ Login as the new user 4/ Examine the last login value from the db (it is still 0) e.g. SELECT username, lastlogin FROM mdl_user WHERE username = 'newuser'; (it will be zero) 5/ Logout as the new user 6/ Examine the last login value from the db (it is still 0) e.g. SELECT username, lastlogin FROM mdl_user WHERE username = 'newuser'; (it will be zero) 7/ Login as the new user again 8/ Examine the last login value from the DB - it is now set. Expected result: Last login value is updated a stage 4

    Description

      It requires a second login to be updated.

      Attachments

        Issue Links

          Activity

            People

              moodle.com moodle.com
              poltawski Dan Poltawski
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: