Life in the trenches

Life in the trenches is about the mixture of forces in ones life. In my case it's family, work, and RPGs.

User Account Pruning

Yes, all users are prunes.. no that's not right.. Dead user accounts should be pruned but I don't want to do it manually.  There we go that's better.

I'm working on a Task Module for CS'07 that will do this for me.  So far I have all of the core code in place but ran into a problem.  It would seem that there is some kind of permission that the ITask based module doesn't have.  I get down to the user deletion call and get a DeleteUserStatus.InsufficientPermissions result back. In the mean time all the job will be able to do is disapprove the account until I can figure this out.

Oh yes.. here is the idea behind the module:

Spammers like to create accounts and they normally have creation = last activity = last login for the dates in the profile.  These are the accounts that I was to automatically delete. This should occur on a time based rule.. X number of days.. disapprove the account.. Y number of days delete the account.  This is valid for non-spammer accounts as well but the dates will not all match.. in this case you have cut offs on the last activity but I'm thinking that it might be better for those accounts to send them an email with the standard warning..

You need to log in soon or your account will be deleted and we'll take all your stuff.

I have yet to implement the email and adjusted rules for the non-spammer accounts sinceI got side tracked on the delete problem.  Hopefully a little more research will yield an answer.  I did look at the code in the admin screens that deletes users and they work basically the same way as my module.  The only difference that I can see is the fact that this is a module; perhaps modules are not trusted?  That could explain the problem.