Delete Users, But Private Messages Remain

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
GoleyC
Registered User
Posts: 374
Joined: Thu Mar 14, 2002 5:22 pm
Location: Ohio
Contact:

Delete Users, But Private Messages Remain

Post by GoleyC »

We had a spammer show up and send out a ton of PM and topics with a link to a spam site.

We have since deleted all of this users post/topics. All their post were removed, however, we are still getting reports from users about private messages from this user. We have confirmed that Private Messages do not get deleted. So we took the extra step and deleted this user from the DB completely, however, the Private messages are still there.

What's the best approach to clean up spam post and links to trojan/virus sites within the forum both in post/topics and private messages when this happens.

Can someone provide a DB query to remove this users PM from the DB, as security at our site is top priority and having these links still around is creating some trouble within the community.
CG

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51201
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Delete Users, But Private Messages Remain

Post by stevemaury »

So we took the extra step and deleted this user from the DB completely,
What does that mean, exactly? Because when you delete a user through the ACP, you DO delte it from the database completely. Deleting things from the database directly is a recipe for trouble.

Here is what I would do instead of deleting the PM's:

Code: Select all

UPDATE phpbb_privmsgs SET `message_text` = 'Message deleted by admin' WHERE `author_id` = N;
N = the user_id of the deleted user.

You can do the same thing with message_subject if you want.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
GoleyC
Registered User
Posts: 374
Joined: Thu Mar 14, 2002 5:22 pm
Location: Ohio
Contact:

Re: Delete Users, But Private Messages Remain

Post by GoleyC »

stevemaury wrote:
So we took the extra step and deleted this user from the DB completely,
What does that mean, exactly? Because when you delete a user through the ACP, you DO delte it from the database completely. Deleting things from the database directly is a recipe for trouble.

Here is what I would do instead of deleting the PM's:

Code: Select all

UPDATE phpbb_privmsgs SET `message_text` = 'Message deleted by admin' WHERE `author_id` = N;
N = the user_id of the deleted user.

You can do the same thing with message_subject if you want.
When I meant deleted user from the DB, we used the ACP through phpbb to delete the user. We thought by doing that, it would also remove that users private messages. However, we kept receiving reports from users, after the user was deleted, their PM where still around.

So we have to take some drastic measure to ensure that our users are not still seeing this link to the trogan/virus site.

We have since used your query above and hopefully the reports coming back will subside.
CG

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26038
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Delete Users, But Private Messages Remain

Post by Paul »

As far i know its a bug in phpBB 3.0.4 and its fixed in phpBB 3.0.5 when thats releated.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
GoleyC
Registered User
Posts: 374
Joined: Thu Mar 14, 2002 5:22 pm
Location: Ohio
Contact:

Re: Delete Users, But Private Messages Remain

Post by GoleyC »

Paul wrote:As far i know its a bug in phpBB 3.0.4 and its fixed in phpBB 3.0.5 when thats releated.
Excellent....waiting on the offical release of 3.0.5!
CG

jerrry
Registered User
Posts: 46
Joined: Mon Jan 02, 2006 9:40 pm

Re: Delete Users, But Private Messages Remain

Post by jerrry »

Can you please tell me how Can I delete all PM from all users on my forum via phpMyAdmin? Thank you.

Locked

Return to “[3.0.x] Support Forum”