We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Delete a member with via MYSQL without leaving orphan info. | Forum

Topic location: Forum home » Support » General Questions
John
John Jun 29 '13
I have stopped anyone joining my community for over 2 months because of Spam bots. I would like to open it up again.

None of the anti spam plugins work and I was getting a new spam member every 5 minutes.

One idea I have is to delete SPAM members by cron every 10 minutes based on an SQL statement.

Something like: DELETE FROM USERS WHERE profile_description contains viagra

I would work out the exact SQL later.

What I want to know is how do I delete a user cleanly without leaving untidy orphans in other tables.

Is deleting a user simpley a case of deleting them from the User table?
 

ross Team
ross Jul 2 '13
John, 


simply by deleting user from the users table will leave all user's content put, which is why we recommend you to find the query in the code which is responsible for deleting user from Admin panel and use it in your SQL statement this way you'll be able to delete a user and his/her content. 

Abbey
Abbey Jul 3 '13
I changed to a different captcha, it's in the store..... I haven't had as many spammers, still get the pay day ones on occasion but I just delete them.

dave Leader
dave Jul 4 '13

The difficult part is that dont think that the delete from admin actually removes the news feed data, i maybe be wrong but i do think there is actually orpan info left there when the user is deleted.   Actually  think it would be difficult to remove the news feed data this way as the data is somewhat complicated.   The only way i know to delete it (if this is the case and its not del by the admin removal of a member)  is to go page by page in the main and delete each one at a time manually.   (lets hope i am wrong on this)

 

You could flush the newsfeed table but IMO your opening a real can of woms doing that.

 

The best way to know for sure is to create a temporary member, post some data, then delete them.  Then export your database, and open it up in programmers notepad and do a search for the member name or or nickname or some of the data they posted.  I think you will be suprised by how much data is still there. 

 

 

The Forum post is edited by dave Jul 4 '13