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

missing redirection when an existing profile field is set to required

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.3.4, 3.4.1, 3.5
    • Authentication
    • None
    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE

      As introduced by MDL-46946 when a custom field is required the user is redirected to the edit profile page to fill it.
      But as detailed below when you update an existing custom profile field and set it as "required" the redirection does not work.

      Steps to reproduce

      1. Go to Site administration/ Users / Accounts / User profile fields
      2. Create a custom profile field which is NOT required.
      3. Edit your profile without filling the new field.
      4. Edit the field and set "Is this field required?" to "Yes".

      Expected : As the field is now required the user should be redirected to the edit profile page.
      Actual : User is not redirected.

      Explanation

      • During profile edition/creation if a field is not required and not filled a record with an empty "data" column is created in user_info_field
      • But profile_has_required_custom_fields_set() consider that a custom field is set if a record exists in user_info_field user/profile/lib.php#L850.
        And as an empty record exists the user is not correctly redirected.

            Unassigned Unassigned
            ak4t0sh Arnaud Trouvé
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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