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

PHP Notice when viewing the profile of a not existing user

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.7, 2.4.4, 2.5, 2.6
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      m26_MDL-40200_Notices_When_Viewing_Profile_Invalid_UserId

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Jul/13