Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by
edited by
I've had thousands of SPAM users join, circumventing reCaptcha and email confirmation, and I want to delete all of them along with anything they've posted.

How do I do this?

I've read in a similar question, dating back 4 years now, that a 'delete' statement in the database is the best way.  I'm happy to do that but would like someone to offer a template SQL statement so I don't accidentally break any indexing/foreign-keys etc.  Alternately, how can I `hide` questions via an SQL statement (which will allow me to delete them via the `Delete Hidden Questions` button?
Q2A version: 1.8.1
Ok, I have blocked all the SPAM users using:

UPDATE `qa_users` SET `flags` =3 WHERE userid > X

Be careful if your have legitimate users amongst the SPAM users, I did not.
edited by
I have now hidden all the SPAM questions using:

UPDATE `qa_posts` SET `type`="Q_HIDDEN" WHERE type = "Q"

Be careful as this does not consider valid questions.  You may need a more elaborate WHERE clause.

(I didn't have to worry about this as my site was set-up to demonstrate Q&A to some friends.)

This is going to take a while, "Deleted 238 of 54,245 hidden questions without dependents..."
(10 hours later, it's up to 31,400+, lol)
edited by
My earlier rant about loosing words was unfounded.  The words are still there, just the cross reference table 'qa_contentwords' has been updated, and reduced from 1.7GB down to 2MB.

1 Answer

+2 votes
I also own one forum and register lots of spammers. I had to give up to reject them - waste my time.