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

PHP Notice when viewing the profile of a not existing user

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.7, 2.4.4, 2.5, 2.6
    • 2.3.8, 2.4.5, 2.5.1
    • Administration
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • m26_MDL-40200_Notices_When_Viewing_Profile_Invalid_UserId
    • Hide

      (Difficulty: easy, but needs testing against all branches)

      1. As a Moodle Administrator, point the browser to a profile URL where the userid is out of the range of the registered users, e.g. http://hostname/path/moodle/user/profile.php?id=1370780391: a message (not an exception) saying Invalid user will be printed out;
      2. As a Moodle Administrator, point the browser to a profile URL related to a deleted user: a message saying This user account has been deleted will be printed out.
      Show
      (Difficulty: easy, but needs testing against all branches) As a Moodle Administrator, point the browser to a profile URL where the userid is out of the range of the registered users, e.g. http://hostname/path/moodle/user/profile.php?id=1370780391: a message (not an exception) saying Invalid user will be printed out; As a Moodle Administrator, point the browser to a profile URL related to a deleted user: a message saying This user account has been deleted will be printed out.

    Description

      While working on MDL-39810, I found a trivial issue in profile.php triggered by using userid not in the database: an exception is thrown (invalid user) but two notices are added two at the end of the message.

      Attachments

        Issue Links

          Activity

            People

              matteo Matteo Scaramuccia
              matteo Matteo Scaramuccia
              Rajesh Taneja Rajesh Taneja
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Sam Hemelryk Sam Hemelryk
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Jul/13