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

editownprofile error should be human readable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.5.3, 2.6, 3.4.5, 3.5, 3.6
    • Fix Version/s: None
    • Component/s: Roles / Access

      Description

      If editownprofile is disabled and a user tries to edit their profile by visiting /user/edit.php then a short print error is thrown as well as a debug trace with the error 'cannotedityourprofile':

      `Sorry, you cannot edit own profile

      More information about this error
      Debug info:
      Error code: cannotedityourprofile
      Stack trace:

      line 463 of /lib/setuplib.php: moodle_exception thrown
      line 121 of /user/edit.php: call to print_error()`

      with a link to moodle docs:
      http://docs.moodle.org/26/en/error/moodle/cannotedityourprofile

      Expected results:

      A well formatted page that explains that the capability 'editownprofile' needs to be enabled to make changes, but a user should be able to VIEW their own profile.

      In addition the error page link should be changed from 'cannotedityourprofile' to 'user:editownprofile':
      http://docs.moodle.org/26/en/Capabilities/moodle/user:editownprofile

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dwahl Daniel Wahl
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            6 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 - 6 hours
                6h