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

Blog posts and user notes are not removed when a user is deleted

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.9.1, 3.3.3, 3.4
    • None
    • Blog, User management
    • MOODLE_29_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE

    Description

      When a user is deleted it is no longer possible to access blog posts and notes related to that user from the Moodle web interface. However, all external blog records, blog associations, blog posts, blog attachments and user notes are still present in the database and in the file store, doing no more than taking up space and slowing down the system.

      When I delete users in Moodle I would expect that the mentioned data is deleted, or that I have some option to perform a cleanup of the obsolete user data.

      Related database tables: mdl_blog_external, mdl_blog_association, mdl_post, mdl_files

      On one Moodle install I'm running, blog attachments belonging to deleted users are taking up close to a GB of moodledata disk space:

      SELECT SUM(filesize) FROM mdl_files INNER JOIN mdl_user ON mdl_files.userid = mdl_user.id AND mdl_user.deleted = 1 AND mdl_files.component = 'blog'
      >SUM(filesize)
      >846101053

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              goodmood Geir Johansen
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: