Programmatically delete a user

Programmatically delete a user

by Joseph Craig -
Number of replies: 2

I'm looking for a method to delete a user programmatically.  Where would I find that?

Average of ratings: -
In reply to Joseph Craig

Re: Programmatically delete a user

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Probably via the external method core_user_delete_users which you can run either via a web service layer or via a local CLI script or so.

Average of ratings: Useful (1)
In reply to David Mudrák

Re: Programmatically delete a user

by Joseph Craig -
Thank you!



On Thu, Mar 5, 2020 at 5:25 AM David Mudrák (via Moodle.org) <