Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-16838

Administration: Loss of user data during delete

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.9, 2.0
    • Fix Version/s: DEV backlog
    • Component/s: Administration
    • Labels:
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated: