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

Username not automatically downcased/Username input automatically capitalized on mobile (with fix)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2, 3.3
    • Fix Version/s: 3.4
    • Component/s: Authentication
    • Labels:
    • Testing Instructions:
      Hide

      You need an android device to test this issue:

      1. Enable emailed-based self-registration.
      2. Visit the signup form (login/signup.php) on Android.
      3. Click on the username field and start entering text.
      4. The first letter is no longer autocapitalized.
      Show
      You need an android device to test this issue: Enable emailed-based self-registration. Visit the signup form (login/signup.php) on Android. Click on the username field and start entering text. The first letter is no longer autocapitalized.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull Master Branch:
      MDL-59053-downcase-username_LATEST

      Description

      For email-based self-registration, the username cannot have any lowercase letters. However, unlike the login form, the username input in the signup form is not automatically downcased. This causes a lot of signup failures for Android mobile users, because on most versions of Android the keyboard automatically capitalizes the first letter in the username field. For my instance, I tracked a 25% failure rate on the username field. This leads to a higher signup dropout rate.

      There should be a precedence for this as the login form already does this and downcasing was used in earlier versions of moodle (1.8 according to MDL-9989). On the user end, users usually expect usernames to be downcased.

      Full steps:

      1. Enable emailed-based self-registration
      2. In the signup form (login/signup.php), enter a username with uppercase letter
      3. Username lowercase error

      Expected: Username automatically downcased

      What actually happens: Lowercase error

      Fix: There are two possible fixes I've found.

      1. Modify the backend to automatically downcase the username field in signup.php and signup_form.php. I've written an auth plugin based on email that does that here.
      2. Add a simple autocapitalize="none" tag to the username input field, ensuring mobile users do not autocapitalize the username. This avoids backend changes.

      I'd be happy to help patch!

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Nov/17