-
Bug
-
Resolution: Fixed
-
Minor
-
3.7.3, 3.8, 3.9
-
MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
-
Trying to delete a user account leads to a database error, if there is 90-100 characters in the user's email address. And the user is not deleted.
When a user account is deleted, username field gets populated with user's email + dot + timestamp (10 characters). If that string is over 100 characters long, it causes a "Data too long for column 'username'" error. 100 chars is the maximum limit for both username and email fields in Moodle database.
Steps to reproduce:
1. Create a new user and fill in an email address with 90 - 100 characters.
2. Try to delete the user created in step 1.