-
Improvement
-
Resolution: Won't Do
-
Major
-
None
-
1.9, 2.0
-
MOODLE_19_STABLE, MOODLE_20_STABLE
As best as I can tell, the delete_user function in /lib/moodlelib.php causes data loss when deleting a user. The problem from my perspective is that the username is replaced with the email address concatenated with the time. The goal is to make the old username, email, and idnumbers available for use. However, as implemented, we lose the username and id number. The email could be found in the new username field. I think a better solution would be to use the description field and prepend a concatenation of those field to the description. Then if we opt to enable the ability to undelete a user, we could attempt to repopulate those fields (providing they do not conflict with an already existing username, email, or idnumber). Alternatively, another simpler solution would be to use username+time, email+time and idnumber+time; however, my concern would be that the username and email fields are varchar(100). Although I suspect that would be fine, in theory, a long username or email would get concatenate but that may be a risk worth taking since implementing would be so easy. Peace - Anthony
- has a non-specific relationship to
-
MDL-16824 Message: Orphaned unread messages when user deleted
-
- Closed
-
-
MDL-7918 Add a function to each module to report whether a given user has any data in a given activity
-
- Closed
-
-
MDL-13563 Hiding but not deleting users who are suspended in LDAP
-
- Closed
-
-
MDL-37139 Recycling of deleted course content and student data
-
- Closed
-
- will help resolve
-
MDL-16647 When user is deleted, the username is lost
-
- Closed
-