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

Function profile_field_base::is_editable throws exception when creating a new user

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-73684-master
    • Hide
      1. Create at least one user profile field (Site administration>Users>User profile fields)
      2. Create a role with two capabilities - moodle/site:configview and moodle/user:create (make sure there is no capability to update users) and check 'System' as 'Context types where this role may be assigned'
      3. Give this capability in system context to a user
      4. Login as this user and go to Site administration>Users>Add a new user
      5. Make sure you are able to create a user and see "Changes saved" message. Don't worry about the 'Access denied' error message.
      Show
      Create at least one user profile field (Site administration>Users>User profile fields) Create a role with two capabilities - moodle/site:configview and moodle/user:create (make sure there is no capability to update users) and check 'System' as 'Context types where this role may be assigned' Give this capability in system context to a user Login as this user and go to Site administration>Users>Add a new user Make sure you are able to create a user and see "Changes saved" message. Don't worry about the 'Access denied' error message.

      After MDL-71621 function profile_field_base::is_editable() can throw an exception when new user is being created

      I can't reproduce in LMS because in normal circumstances it is only a validation and does not return "false" but it breaks some custom user creation forms in workplace

      edit: I was able to reproduce on LMS too, see testing instructions

            marina Marina Glancy
            marina Marina Glancy
            Amaia Anabitarte Amaia Anabitarte
            Shamim Rezaie Shamim Rezaie
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 41 minutes
                1h 41m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.