Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.7.3, 3.8, 3.9
-
Component/s: User management
-
Labels:
-
Testing Instructions:
-
Workaround:
-
Affected Branches:MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
Fixed Branches:MOODLE_37_STABLE, MOODLE_38_STABLE
-
Pull from Repository:
-
Pull 3.8 Branch:
MDL-67499-38 -
Pull Master Branch:
-
Pull Master Diff URL:
Description
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.