When a user is deleted the name is set to 'deleted'. This I suppose is in order to show this new 'name' in the author field of any posts of the user that may remain in the topics.
If I do a memberlist and then click on search without entering any information, the resulting memberlist will include all of these deleted users (in our case almost doubling the size of the list).
Is there anyway to actually delete these deleted users for good other than doing it by hand one by one? For instance all which have a last posting date before a certain date.
And what happens to posts written by one such deleted deleted user (yes I purposefully wrote deleted twice ) if any should happen to still exist?
I don't think there is an easy way of doing it. The reason for deleted users remaining on the members list is because of problems caused by their posts still being accessible.
you could edit the database but you would have to be very careful how you do it.
did you change 'n/a' to 'deleted' ? Because the default behavior is to name them 'n/a' and there is a filter in members.asp so that 'n/a' users will only be shown to Admins.
To solve the problem of deleted users showing up when you search on nothing, find the following and add the code in green (can't give line references right now):
' if Request.querystring("link") <> "sort" then
whereSql = " WHERE M_NAME <> 'n/a' AND ("
tmpSql = ""
Permanently deleting members who have posted in your forums will reult in all kinds of errors. You will need to delete any posts they made before doing so. Of course, doing so presents its own problem if the post was in the middle of a thread as any subsequent replies may make no sense.
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.”
No we haven't changed n/a to deleted so the name is n/a and deleted appears in the title field. If the n/a users are only ever shown to admins then that isn't really an issue for us. I normally try to refrain from editing the code unless absolutely necessary. Editing the database not an option at all for us I think!
About permanently deleting users I can appreciate the likelyhood of errors resulting from this, where messages still exists. Yet the option to delete an n/a user exists in the memberlist (for admins) so is a check performed when this option is used to see if any messages remain then?
Thanks for all the swift responses! Yet the option to delete an n/a user exists in the memberlist (for admins) so is a check performed when this option is used to see if any messages remain then?
yes, exactly the same check as was performed the first time you deleted them.
A user will only be permanently deleted if there are no posts associated with the userid