General developer forum

Let users delete there own account

Picture of Fabienne Neveu
Let users delete there own account
hi there,

at the moment we are thinking of enabling email_auth-users
to delete their own accounts.

An old plugin did that job for Moodle not newer than 2.8:

We did not have that in use and it does not seem to work for Moodle 3.

So on the one hand we'd like to know wether there is a similar
Plugin for Moodle 3. Are there maybe updates to the above mentioned ?

What is more, it is highly desireable to make
sure that the user gets entirely deleted in the whole database.
Especially that means to kill all references in other tables of
a user to delete.

Is his guaranteed concerned with all standard Moodle plugins (via foreign key
restriction) ? E.G. will forumpostings of a deleted user be vanished ?
How can self-made plugins be prepared (not to carry data from deleted users) ?
Do you know other places (apart from statistical data) where Moodle stores
data of deleted users persistantly ?


Average of ratings: -
Picture of Mark Johnson
Re: Let users delete there own account
Core developersParticularly helpful MoodlersPlugin developers

This sounds like the sort of thing the Privacy API is designed to take care of - all plugins will be able to report where they are storing data about a particular user so it can be deleted in response to a user's request, and provide a function to perform the deletion.

I'm not sure if the Data Privacy plugin which is being introduced alongside the API will allow users to actually trigger deletion of their own data.  From what we were shown at last week's MoodleMoot in Glasgow, it will allow users to request their deletion, and the data protection officer needs to approve it before it's actually triggered.

I suppose something like local_goodbye could be written or modified to do what you're after using the Privacy API, if that's really what you wanted.

Average of ratings: -