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

            vmdef Victor Déniz Falcón
            vmdef Victor Déniz Falcón
            Luca Bösch Luca Bösch
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona), David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10/Sep/18