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

user_not_fully_set_up() should force users to complete required custom user profile fields

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. As an admin, define a required custom field.
      2. Make sure that users are redirected to the profile edit page to provide a value for required custom fields (same as for missing name or email).
      3. Make sure that if the required field is invisible or it is locked (and therefore can't be edited by the user), the user is not redirected to the profile page.

      Tips for extra tests:

      • If users are redirected to edit the profile and fill missing required custom fields, the filepicker / repositories should keep working on that page (applies to custom fields only).
      • In MNet environment, adding a custom profile field to the service provider site as required is not (has never been) supported. Users are expected to get an error that their profile is incomplete and are sent back to their identity provider site.
      Show
      As an admin, define a required custom field. Make sure that users are redirected to the profile edit page to provide a value for required custom fields (same as for missing name or email). Make sure that if the required field is invisible or it is locked (and therefore can't be edited by the user), the user is not redirected to the profile page. Tips for extra tests: If users are redirected to edit the profile and fill missing required custom fields, the filepicker / repositories should keep working on that page (applies to custom fields only). In MNet environment, adding a custom profile field to the service provider site as required is not (has never been) supported. Users are expected to get an error that their profile is incomplete and are sent back to their identity provider site.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-46946-master-reqcusfield

      Description

      In /lib/moodlelib.php, the function user_not_fully_set_up() needs to be improved to check that required custom user profile fields have been completed.

      Currently users only need to complete their firstname, lastname and email fields in order to be considered 'fully set up'. The only way to ensure that required custom profile fields are completed is to modify core Moodle code, which is not ideal.

      There is a discussion on this issue at https://moodle.org/mod/forum/discuss.php?d=204052.

        Attachments

        1. MDL-46946.patch.txt
          0.9 kB
          David Mudrák (@mudrd8mz)
        2. profile_field_force_complete.patch
          0.9 kB
          Olumuyiwa Taiwo
        3. Screenshot_2016-09-21_10-26-18.png
          43 kB
          David Mudrák (@mudrd8mz)
        4. Screenshot_2016-09-21_10-35-39.png
          54 kB
          David Mudrák (@mudrd8mz)

          Issue Links

            Activity

              People

              Assignee:
              mudrd8mz David Mudrák (@mudrd8mz)
              Reporter:
              muyiwataiwo Olumuyiwa Taiwo
              Peer reviewer:
              Olumuyiwa Taiwo
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              17 Vote for this issue
              Watchers:
              17 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Nov/16