Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

How to delete all comments by user?

Asked Modified Viewed 2,603 times
D
docmike
D
  • Member, joined since
  • Contributed 68 posts on the community forums.
  • Started 8 threads in the forums
  • Started this discussions
asked
Member

Someone registered on my site and posted more than 100 obscene comments.

Can I somehow delete all comments by that user, instead of checking every news item individually?

Thanks.
0 replies

12 posts

W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

Use this at your own risk. Backup comments table if necessary before running the code.

It will delete all comments by the user 999999 independant on the comment type. Change 999999 to the user id you wish to delete all comments for and preview the code in a custom page:

<?php
$result = dbquery("DELETE FROM ".$db_prefix."comments WHERE comment_name = '999999' ");
if ($result) { echo "<center>Comments deleted!</center>"; } else { echo "<center><b>ERROR:</b> There was a problem deleting comments.</center>"; }
?>
0 replies
W
Wanabo
W
Wanabo 10
www.probemyip.com/probe-my-ip-80x15.png
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.
  • Senior Member, joined since
  • Contributed 598 posts on the community forums.
  • Started 94 threads in the forums
answered
Senior Member

Or delete this user, all posts and comments are deleted aswell!!
0 replies
T
tapaga
T
tapaga 10
  • Junior Member, joined since
  • Contributed 22 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

As Wanabo says, just delete the user from the user admin control panel.

It instantly removes all of their comments.

If they've posted that many, they deserve to have their account deleted anyway.
Edited by tapaga on 14-03-2007 01:48,
0 replies
J
Joe Kriz
J
  • Senior Member, joined since
  • Contributed 281 posts on the community forums.
  • Started 39 threads in the forums
answered
Senior Member

I've had to delete the same person 3 times today as they keep signing up as anew member.
Different IP's every time and different email address but the same type of name, luis 7467, or something similar with 4 numbers after the name. Reminds of the problems with subimp997 in the past.

I read your other post and replied there also....
0 replies
D
docmike
D
  • Member, joined since
  • Contributed 68 posts on the community forums.
  • Started 8 threads in the forums
  • Started this discussions
answered
Member

Thank you. I deleted the offenders and blacklisted their IP addresses.
0 replies
I
inuken
I
inuken 10
  • Member, joined since
  • Contributed 57 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

ya..happend to me too...today :@ i deleted him, btw can tell me someone how to ban the IP of some one? i tried, but nothing happend..how is working?
0 replies
T
tapaga
T
tapaga 10
  • Junior Member, joined since
  • Contributed 22 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

Quote

inuken wrote:
ya..happend to me too...today :@ i deleted him, btw can tell me someone how to ban the IP of some one? i tried, but nothing happend..how is working?


You go to User Admin, then go to Blacklist, then enter the IP address of the spammer.

You can find out the IP address from the comments management system, or from the IP logo on the forum.
0 replies
I
inuken
I
inuken 10
  • Member, joined since
  • Contributed 57 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

i know that, but doesn't work :(
0 replies
T
tapaga
T
tapaga 10
  • Junior Member, joined since
  • Contributed 22 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

Quote

inuken wrote:
i know that, but doesn't work :(


How do you know it doesn't work?
0 replies
I
inuken
I
inuken 10
  • Member, joined since
  • Contributed 57 posts on the community forums.
  • Started 14 threads in the forums
answered
Member

i tried on myself :D
0 replies
A
alcazar
A
Alcazar
nach Diktat spazierengegangen
  • Senior Member, joined since
  • Contributed 247 posts on the community forums.
  • Started 5 threads in the forums
answered
Senior Member

you can try to use our blacklist lusername mod.
should be somewhere in this forum (core support).
then enter the name like "luis*" ...
0 replies
M
mariagc
M
  • Member, joined since
  • Contributed 77 posts on the community forums.
  • Started 23 threads in the forums
answered
Member

i've noticed a pattern.. anybody that registers with a user name that has several numbers either before or after their name and has an email address that is illegible.. (ie.... nrsbjjjes.com) is spam
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 12 posts
  • Votes 0 votes
  • Topic users 8 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet