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

Custom user profile field entry allows non-unique value when it should not

    Details

    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1. Create a custom user profile field type and implement field validation with the edit_validate_field() function.
      2. Add a custom user profile field of custom field type created in step 1, set the field to display on user signup.
      3. Register a new user via email-based self-registration and enter an invalid value for the custom field.
      4. We expect the field to be validated and a warning message to show, but the field is not validated and the registration succeeds.

      Show
      1. Create a custom user profile field type and implement field validation with the edit_validate_field() function. 2. Add a custom user profile field of custom field type created in step 1, set the field to display on user signup. 3. Register a new user via email-based self-registration and enter an invalid value for the custom field. 4. We expect the field to be validated and a warning message to show, but the field is not validated and the registration succeeds.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-28998-master

      Description

      A new custom user profile field type (in the /user/profile/field directory) has been created. The edit_field_add() function has been used to display the field and the edit_validate_field() function has been used to validate the field input upon form submission. The problem is that the field is only validated when updating the field value on the user's profile, but not on user signup (email-based self-registration).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/12