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

Registry cache bypass in add_to_log()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.4, 1.9
    • Fix Version/s: 1.8.5, 1.9.1
    • Component/s: General
    • Labels:
      None
    • Environment:
      moodle with registry cache activated.
    • Database:
      Any
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      Current implementation of add_to_log() updates user lastaccess field by issuing the next instruction:

      $res = $db->Execute('UPDATE '. $CFG->prefix .'user
      SET lastip=\''. $REMOTE_ADDR .'\', lastaccess=\''. $timenow .'\'
      WHERE id = \''. $userid .'\' AND '.$timenow.' - lastaccess > 60');

      This method doesn't take care of registry caché. update_record() should be used to update that fields.

      One of the actual problems has to do with messaging subsystem and email notifications being sent because of inconsistency of rcache.

      Thanks in advance

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            jsegarra Juan Segarra Montesinos
            Tester:
            Petr Skoda
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Apr/08