Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

orphan record finder and [deleted user] removal.

peregrineperegrine MVP
edited November 2013 in Development

preamble...
if you had 10000 spam applicants) and you declined them or used cleanser (which uses the delete user and content option) and you only had 20 members. you would have 100000-20 wasted entries in user table.


Q1 - do you think there is any significant performance increase removing users? Certainly the database table would be smaller.

I was writing a plugin that removes [Deleted Users] from the User Table.

checks for deleted flag > 0 , banned flag < and comment and discussion count < 1

everything works fine. However the one gotcha, if a user has been deleted with the blank the content option.
there will be orphan records.


A ) I could check for that in discussions, comments, and activity, and conversations and remove the blanked comment as if it were a total delete OR
B ) leave the [Delete User] if there is blanked comment

Q2 - which way would be best (A or B ).


Q3 - if there is a plugin that has its own table with userids and the user is deleted, it will leave orphans, (which may be the case anyway with the delete content process)

So the big question would it be worth writing an orphan finder and would it have any value?

feedback will determine if I proceed, since it is just a game and I have no need for the plugin myself.

btw I think the conversations table has the most orphans - since conversations are stored forever, even when everyone in the conversation has deleted them. Probably the edit log behaves this way as well if a user is deleted (haven't checked on that).

I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

UnderDog

Comments

Sign In or Register to comment.