Mass deletion of users & files? [message #1061542] |
Sun, 02 June 2013 16:26 |
Javier Pedemonte Messages: 5 Registered: July 2009 |
Junior Member |
|
|
What's the best way to delete a lot of (inactive) user accounts and associated files?
We have an installation with a lot of users, many of whom registered an account once but no longer use it. I'd like to:
1. Identify users that should be deleted.
2. Delete users' profiles.
3. Delete users' files.
For (1), I see that in /profile/user-list.html, there is a column for when each user last logged in. What is the best way to get users who have last logged in a long time ago (i.e. before Jan 1, 2013)? I know I can get the users list using curl (with admin account). I could probably then create a script to sort and filter according to the "last login" field. Is there an easier way?
Once I have this list of users I want to delete, what's the best way to accomplish this? Again with REST/curl? Looks like I can send a DELETE request to .../users/{UID} for each user (with admin account?).
Should deleting a user profile also delete that user's files/dirs? Doesn't look like it does. How do I correctly also delete files/dirs?
|
|
|
Powered by
FUDForum. Page generated in 0.04502 seconds