Deleted User Anonymizer

Administration tools ::: tool_deleted_user_anonymizer
Maintained by Marius Rosenbaum, oncampus GmbH, Alexander Müller, Ramona Rommel
Moodle retains some user data by design even after user deletion, which may be a concern depending on the specific data privacy policies of an organisation or local legal interpretations. This plugin anonymizes the remaining personal data in the mdl_user-table after deletion.
Latest release:
3 downloads
2 fans
Current versions available: 1

Deleted User Anonymizer is a "tool plugin" that anonymizes deleted users in Moodle. There are two ways to trigger the anonymization process:

  1. Event trigger: When a user is deleted, anonymization is automatically triggered for that user.
  2. Manual anonymization: Administrators can manually trigger anonymization for all previously deleted users.

If user fields are not deleted during account deletion, they are anonymized as follows:

  • The userid remains unchanged.
  • The firstname is replaced with a random adjective.
  • The lastname is replaced with a random animal name.
  • The username is replaced with the new firstname + lastname + a timestamp.

Installation

  1. Clone the repository into the /admin/tool/user_anonymizer directory of your Moodle installation:
  2. Visit Site administration → Notifications to trigger the installation, or run admin/cli/upgrade.php.

Configuration

After installation, the plugin can be configured via: Website-Administration → Plugins → Admin tools → Delay for anonymizing user data

Screenshots

Screenshot #0
Screenshot #1

Contributors

Marius Rosenbaum (Lead maintainer)
Alexander Müller
Please login to view contributors details and/or to contact them

Comments

Show comments
  • Plugins bot
    Wed, 10 Dec 2025, 11:50 PM
    Approval issue created: CONTRIB-10219
  • Wazza
    Fri, 12 Dec 2025, 4:45 PM
    Very nice! Can someone tell me if the standard Moodle way of handling things in mdl_user is actually conform the GDPR legislation in EU? Because if not, don't we need this plugin to be standard Moodle functionality to keep it legal in the EU? We do have a 'right to forget' in the EU, and just setting the mdl_user record to 'deleted=1' always stroke me as odd. Handy, but odd smile
Please login to post comments