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

User filter not work properly if filter string '0' is provided.

    XMLWordPrintable

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide

      Pre-requisites:

      • Have a user with a "0" (zero) on the firstname or lastname
      • Have more than 1000 users in the platform

      Instructions:

      1. Enter a course as a manager and go to participants
      2. Click on the header gear and go to "Enrolments methods"
      3. Click on the icon "Enrol users" on the Manual enrolments method
      4. On the right part of the form, write "0" in the search box
      5. Then the user with "0" in the name should appear
      Show
      Pre-requisites: Have a user with a "0" (zero) on the firstname or lastname Have more than 1000 users in the platform Instructions: Enter a course as a manager and go to participants Click on the header gear and go to "Enrolments methods" Click on the icon "Enrol users" on the Manual enrolments method On the right part of the form, write "0" in the search box Then the user with "0" in the name should appear
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull Master Branch:

      Description

      String '0' is ignored because of "if ($search) {}" in users_search_sql() function.

        Attachments

        1. current.png
          current.png
          28 kB
        2. expected.png
          expected.png
          30 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            papillon326 Mitsuru Udagawa
            Peer reviewer:
            Ferran Recio
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h