
Originally Posted by
foofoo
yankidank: Killspamming a user is a really serious action, so you should be very careful when marking stories and comments as
spam. There is no simple undo option to reverse the actions that the
killspam takes.
UPDATE pligg_links SET link_status = replace(link_status,"spam","published")
That may change stories that were accidentally marked as spam as published, but it will also publish any spam stories that you have in your database so I would advise against that. You would probably want to include the user ID that you accidentally killspammed so that it will only recover their stories. You would also want to re-enabled the account so that they are no longer marked as a spammer.
Below is my guess at what query you could run to undo all of this. I haven't tested it, and I'm not very good at queries off the top of my head so this could probably use some testing and improvement. You will need to know the killspammed user ID (number) for the first part and username for the second. Place the user ID after the link_author part (set to 1 in the example).
Code:
UPDATE pligg_links
SET link_status='queued'
WHERE link_author='1' AND link_status='spam'
UPDATE pligg_users
SET user_enabled='1' AND user_level='normal'
WHERE user_login='username'
If you choose to try the code above out, please backup your database first so that you won't hate me if something goes terribly wrong.