I have an intranet and users authenticate with the Active Directory Provider. As Active Directory sync only works for the first time a user logs in, we need to delete DNN user accounts separately from AD User accounts or risk bloating the DB.
I was thinking of setting up a stored proc to do this based on when a user last logged in. If they hadn't logged in in say 6 weeks, then their account get deleted. This should cover anyone who takes their 4 weeks annual leave at once from getting deleted and losing their portal rights.
As far as I can tell so far, I have user info in dbo.Users, dbo.UserProfile, dbo.UserPortals, dbo.UserRoles, dbo.aspnet_Users and dbo.aspnet_UserProfile. If I just have my sproc delete the users from here, will this adversely affect anything else?
Secondly, on the Edit User Account form there is a Last Activity Date field but I can't find this in the DB. While there's a dbo.UsersOnline table, this is empty. I presume this is because I have Disable Users Online checked in my Host Settings. So I'm a little confused as to how the Edit User Account form is populating the Last Activity Date field.
thanks
Mike