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

Administration: Allow username to contain an underscore

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9, 2.0
    • Fix Version/s: 2.0
    • Component/s: Administration
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Currently, the username is not allowed to contain an underscore. The validity check when manually creating a new issue states that the username field "Can only contain alphabetical letters or numbers"; however, periods and commas are allowed. It would make sense to also allow the underscore character. Part of what necessitates this is that the uploading of users was previously not checking for the underscore character so in fact some sites have users with them and others have discovered now that the underscore is being removed in 1.9 uploads. To be consistent, we should determine whether we are going to allow them or not and if so then we will need to fix the upload so that it does not strip out the underscore character and modify the validity check when manually adding a new user so that it allows it. We should also change the warning so that it is more accurate so that it states that the username "can only contain alphabetical letters, numbers, periods, commas, and underscores". In the meantime, in the hopes of preventing confusion, I have added notes about validity checking and requirements for the username field in Moodle docs at the following locations:

      http://docs.moodle.org/en/Update_profile#Adding_a_new_user
      http://docs.moodle.org/en/Upload_users#Upload_file_format
      http://docs.moodle.org/en/Edit_profile#User_name

      When this issue is resolved, we should probably go back in and make sure the docs reflect what we have done.

      Peace - Anthony

        Gliffy Diagrams

          Attachments

          1. 20091117_HEAD_mdl_16919.patch
            4 kB
          2. 20091118_HEAD_mdl_16919.patch
            4 kB
          3. 20091118_moodlelib.php.patch
            1 kB
          4. 20091119_HEAD_moodlelib.php.patch
            1 kB
          5. 20091119_HEAD_testmoodlelib.php.patch
            3 kB
          6. 20091120_HEAD_testmoodlelib.php.patch
            3 kB
          7. 20091124_HEAD_mdl_16919.patch
            7 kB
          8. 20091203_mdl_16919_HEAD.patch
            11 kB
          9. 20091221_mdl_16919.patch
            15 kB
          10. 20091222_mdl_16919_HEAD.patch
            20 kB
          11. upload_validation1.png
            upload_validation1.png
            14 kB
          12. upload_validation2.png
            upload_validation2.png
            16 kB
          13. uploaduser_20100201_2.patch
            15 kB
          14. useruploadfile.jpg
            useruploadfile.jpg
            42 kB

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    24/Nov/10