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

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.9.1, 3.3.3, 3.4
    • Fix Version/s: None
    • Component/s: Blog, User management
    • Labels:
    • Affected Branches:
      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

              • Assignee:
                Unassigned
                Reporter:
                goodmood Geir Johansen
                Participants:
                Component watchers:
                Adrian Greeve, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: