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

Hardcoded sql table alias in two user_get_* functions

    XMLWordPrintable

    Details

      Description

      The user_get_user_lastaccess_sql function (user/lib.php) has a sql table alias parameter, that is not used in the sentence:

      return $tableprefix . '.lastaccess != 0 AND u.lastaccess < ' . $accesssince;
      

      Same with user_get_course_lastaccess_sql (user/lib.php):

      return $tableprefix . '.timeaccess != 0 AND ul.timeaccess < ' . $accesssince;
      

      Both functions are only called from user_get_participants_sql using the default $tableprefix value, therefore they go unnoticed.

        Attachments

          Activity

            People

            Assignee:
            vmdef Víctor Déniz Falcón
            Reporter:
            vmdef Víctor Déniz Falcón
            Peer reviewer:
            Luca Bösch
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              10/Sep/18