User Sync Tool - Step 2 - delete scanned users with no shared files
Step 2
Adding/extending user deletion functionality. Some code may be taken from !33 (closed) as necessary.
Currently only users that have never logged in to Google are deleted when/instead of suspended. This needs to be maintained, though for simplicity it may be better/cleaner to separate the suspension from deletion. i.e. suspend the user when cancelled in Lookup, then on next sync, any suspended users that have never logged in can be deleted.
Additional user account deletion, if all these met:
-
suspended
in Google -
cancelled
in Lookup -
cancelledDate
in Lookup 2+ years ago -
mydrive-shared-action
is unset/empty (i.e. no pending action for the drive tool) -
mydrive-shared-result
set to "clean" (i.e. their mydrive has been scanned and no shared files were found)
This is for the March update. Deletion of all users with "removed" mydrive-shared-result
is left for #42 (closed) for September.
Edited by Robin Goodall