I use Moodle Moodle 3.6.3 (Build: 20190311) and can't permanently delete user in any way. After manually deleting a user using Moodle's standard admin interface, the user appeared on deletion request list. I approved the request, ran the cron but his account stays in the database forever with attribute deleted=1. Deleting the record from DB table mdl_user would break the database relations so it's not an option for me.
I also tried to set User level Data retention period to automatically delete users that have been inactive for a certain period of time. I wanted to delete users after 1 year of inactivity so I set this in the data registry. I selected User context on the left, created and selected new purpose with retention period of 1 year. Protected option not selected. I ran the cron but no users are shown on Data deletion page although I have several users that haven't login to the system for more than a year.
So I'm currently out of ideas. Any help would be appreciated.