-
Improvement
-
Resolution: Fixed
-
Minor
-
3.2, 3.3
-
MOODLE_32_STABLE, MOODLE_33_STABLE
-
MOODLE_34_STABLE
-
MDL-59053-downcase-username_LATEST -
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:
- Enable emailed-based self-registration
- In the signup form (login/signup.php), enter a username with uppercase letter
- Username lowercase error
Expected: Username automatically downcased
What actually happens: Lowercase error
Fix: There are two possible fixes I've found.
- 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.
- 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!