Home
The Toolkit for Online Communities
17465 Community Members, 0 members online, 2146 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : Problem when i tried to delete a user from db (nuke user) : One Message

Forum OpenACS Development: Re: Problem when i tried to delete a user from db (nuke user)

I would not delete the fk constraint! This would cause your data to be very inconsistent (since it would have creation_users that don't exist). Why do you need to Nuke a user? Why isn't delete enough? One way of doing this if your goal is to "free up" their email address as a username or something like that is to change their email address to a bogus one... like this deleteduser12345@hostname.tdl that way you allow the email address or username to be used by a new legitimate user. If you goal is that they not show up in user searches (a problem i had in the past - i don't know if this has been fixed) a better way is to edit the search to not show deleted users.

If you need to nuke a user and want to do this the right way it will be very tricky. You will need to delete all any object created by that user or within the security context of that user, any object that is a child of the object created by that user, and child of that child... Note that his may mean, if for exampe a user you are trying to delete responded on a forum that you are deleting posts made by others on that forum since they were responding to the deleted user object.