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

Registry cache bypass in add_to_log()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8.5, 1.9.1
    • 1.8.4, 1.9
    • General
    • None
    • moodle with registry cache activated.
    • Any
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      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

            stronk7 Eloy Lafuente (stronk7)
            jsegarra Juan Segarra Montesinos
            Petr Skoda Petr Skoda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.