Physically delete moodle users

Physically delete moodle users

by Eduardo Hm -
Number of replies: 2

Hi,

I manage several Moodle platforms in versions 3.1.1 in which there are an average of 30,000 users. Of these 30,000 users, I have an average of 6,000 on each platform that are active users, that is, users that access the platform in the last two years. The rest of the users are no longer active users or are leaving the platform. My intention is to not only mark the "deleted" field of the user to 1 to unsubscribe, but I want to make a clean and delete all other users of the physical form of the database.


The question is: Will it be enough to throw the "delete" statement of sql on all the users that we want to remove from the database?


Thank you very much in advance.

Average of ratings: -
In reply to Eduardo Hm

Re: Physically delete moodle users

by C Behan -

Hi Eduardo,


I don't have a direct answer to your question re using sql, but you can certainly bulk delete user accounts thru the UI.

  • Go to [YourMoodleSite]/admin/user/user_bulk.php
  • Filter the users by those whose last access is before 2 years ago
  • Select all the (filtered) users
  • With selected users ... delete.


Catherine