Affects Version/s: 3.2, 3.3
Fix Version/s: 3.4
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
Pull from Repository:
Pull Master Branch:
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.
- 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!