Advertisement:

Author Topic: How to delete all the messages of one member  (Read 9315 times)

Offline ulrrike

  • Newbie
  • *
  • Posts: 6
How to delete all the messages of one member
« on: May 29, 2009, 11:53:22 AM »
Hallo,

I've had a big problem with spam I think a robot succeeded to get a user account and now I have hundreds of porn images.

I've put the forum under maintenance but I cannot find a function for deleting all these messages at once (or any function to delete various messages)

Thanks a lot for your help !

ulrrike

Offline Mraza

  • Language Moderator
  • Full Member
  • *
  • Posts: 510
  • Gender: Male
  • I ♥ SMF
Re: How to delete all the messages of one member
« Reply #1 on: May 29, 2009, 11:54:02 AM »
when you are banning some users you have the option to also delete there posts
Signature:
Old Software Engineers Never Dies, They Just Log Out...
! ! ! ! ! 5 Best Movies Thread ! ! ! ! !

Offline ulrrike

  • Newbie
  • *
  • Posts: 6
Re: How to delete all the messages of one member
« Reply #2 on: May 29, 2009, 04:33:26 PM »
Hi thanks for your answer.

I can only find "add a new banning" - is that the same thing?


Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,611
  • It's quite perplexing isn't it
Re: How to delete all the messages of one member
« Reply #3 on: May 29, 2009, 04:46:10 PM »
Have you deleted the user yet?  If not, then when you delete them you have the option at that point to remove all posts.

If you are afraid of them returning, take a note of all their details first before deleting them (IP address, email address, user name, etc)  Then after you have deleted them and all their posts, go into the admin > ban section and add a new ban trigger with all the information from the deleted user.

Offline ulrrike

  • Newbie
  • *
  • Posts: 6
Re: How to delete all the messages of one member
« Reply #4 on: May 29, 2009, 05:23:13 PM »
Hi,

No I havn't I'm waiting for an anwer - to know if add a new banning is the right thing: if I delete the user the wrong way, I miss the option of deleting his posts...!

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,611
  • It's quite perplexing isn't it
Re: How to delete all the messages of one member
« Reply #5 on: May 30, 2009, 11:35:45 AM »
If you go into the user's profile, there is an option there to delete user.  When you select that option, that is where you get the option to delete his posts or not.

As I said, if you want to ban them to prevent them coming back again, make sure to write down all their details before you do the "delete user" step above.  Then once you have deleted him and his posts, set up a new ban trigger with all the details you wrote down.

Offline ulrrike

  • Newbie
  • *
  • Posts: 6
Re: How to delete all the messages of one member
« Reply #6 on: June 01, 2009, 06:50:07 PM »
Hallo

Thank you for your reply !

I don't know why I can't find these option: when I click on members>ada...(the spammer)>delete, I get again to the "add a new banning" page which doesn't seem to give any option to delete messages...

name of the banning
reasons
notes
restriction

and so on and after deleting there"s no option either (but I can make the banning expire so do it again)

Thank you really.......



Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,611
  • It's quite perplexing isn't it
Re: How to delete all the messages of one member
« Reply #7 on: June 01, 2009, 06:53:25 PM »
you should be looking in the member's profile

it should be something like this - replace the xxxxxxxxxx with your forum address and where it says u=xxxxxx this should be the member number of the user you want to delete.  (holding your cursor over their name will give you the number) This will take you to their profile where you will see the "delete this account" option and from there you have the option to delete all their posts or not :)

http://www.xxxxxxxxx/forum/index.php?action=profile;u=xxxx;sa=deleteAccount

Offline ulrrike

  • Newbie
  • *
  • Posts: 6
Re: How to delete all the messages of one member
« Reply #8 on: June 02, 2009, 06:22:38 PM »
That was a really good idea, and it got me to the famous page...BUT SMF didn't delete the messages (and I had chosen to delete "all messages")

Well I suppose that was it, and I'll pass one night viewing real great images...............

But I would like to thank you, quiteperplexed, that was really nice (by the way, can I vote for anwers ?)

Offline JimM

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,977
  • Gender: Male
    • Southern Spirit Hunters
Re: How to delete all the messages of one member
« Reply #9 on: June 03, 2009, 01:13:06 PM »
If this issue is solved, please mark it solved by clicking the Mark Topic Solved link. :)
Jim "JimM" Moore
Former Support Specialist
jimm@simplemachines.org

Please do not PM me for support!                   
Installing SMF
Upgrade SMF
Manual Installation of Mods

Offline ulrrike

  • Newbie
  • *
  • Posts: 6
Re: How to delete all the messages of one member
« Reply #10 on: June 05, 2009, 03:37:21 PM »
Hallo,

That's quite nice, to have somebody from smf !!!

Well then, as you could see, the problem wasn't solved...I only think there isn't any solution - is there......... ?

Thank you

Offline JimM

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,977
  • Gender: Male
    • Southern Spirit Hunters
Re: How to delete all the messages of one member
« Reply #11 on: June 07, 2009, 12:33:28 PM »
Hallo,

That's quite nice, to have somebody from smf !!!

Well then, as you could see, the problem wasn't solved...I only think there isn't any solution - is there......... ?

Thank you

quiteperplexed gave you the solution.  If you delete the member from their profile, you will be given the option to delete all messages.  If you selected that and it didn't delete all the messages, then you have some other issue that we will need more information in order to suggest a solution.  Were there any errors in the log?  Have you already deleted this person?
Jim "JimM" Moore
Former Support Specialist
jimm@simplemachines.org

Please do not PM me for support!                   
Installing SMF
Upgrade SMF
Manual Installation of Mods

Offline Spyd

  • Newbie
  • *
  • Posts: 2
Re: How to delete all the messages of one member
« Reply #12 on: April 04, 2011, 09:49:51 AM »
Sorry to bump this old thread, but my problem is that I already deleted the user... and all the posts remained.
I guess I missed the delete messages option.

So I looked at a possible solution, and as I didn't find one, I invented one myself.

Execute this using the "MySQL Query Browser":
Code: [Select]
DELETE FROM smf_messages WHERE poster_name='spammer';
Note that the "smf_" prefix is something you put as you config the forum, this is the default prefix, but yours may be different.
Obviously the name 'spammer' is where you put the member name.

Then use the routine mantainance tools to 1. Find & repair errors (do it and fix until there are no more errors reported) 2. Recount all forum totals and statistics (because stastics will be wrong)

I wont give more details using this solution; if you need more, clearly this is not the solution for you. And that's because the following warning:

WARNING!: Using data-modifiyng queries on your database can destroy all your forum (and other things you may have on the database), so proceed with extreme caution. This worked for me, but I can't be sure if it'll work for you. Backup your database befory trying this.
« Last Edit: April 04, 2011, 10:14:57 AM by Spyd »

Offline Illori

  • Doc Coordinator
  • SMF Master
  • *
  • Posts: 27,045
Re: How to delete all the messages of one member
« Reply #13 on: April 04, 2011, 12:07:21 PM »
in the future please do not bump old topics you are best to create a new one for your issue

Offline ziycon

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,877
  • Gender: Male
Re: How to delete all the messages of one member
« Reply #14 on: April 04, 2011, 12:23:36 PM »
What Spyd said will work, but your better narrowing it down to the specific user incase there are other occurrences of the username associated to other posts, you can use the below query to base it off the user with the assigned name in your members table.
Code: [Select]
DELETE FROM smf_messages WHERE ID_MEMBER=(SELECT ID_MEMBER FROM smf_members WHERE memberName='<username>');
Once this is done just delete the user.

**As always make sure to backup the database before making any changes.
Please don't PM me for support unless asked as they'll be ignored.
If you've removed the SMF copyright you won't get support.

ign.ie | SQLFace | APRAI | war.ie

Offline JimM

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,977
  • Gender: Male
    • Southern Spirit Hunters
Re: How to delete all the messages of one member
« Reply #15 on: April 06, 2011, 09:37:52 PM »
in the future please do not bump old topics you are best to create a new one for your issue

Illori, in this case Spyd was adding a solution and not opening an additional issue.  It's quite ok for members to add solutions to older topics because the more solutions we have the better we all are.
Jim "JimM" Moore
Former Support Specialist
jimm@simplemachines.org

Please do not PM me for support!                   
Installing SMF
Upgrade SMF
Manual Installation of Mods

Offline estecb

  • Newbie
  • *
  • Posts: 4
Re: How to delete all the messages of one member
« Reply #16 on: May 04, 2012, 07:39:05 PM »
You people are forgetting to remove the topics as well. Otherwise, weird things will happend within your forums...


Code: [Select]
DELETE FROM smf_messages WHERE ID_MEMBER = <id>;
Code: [Select]
DELETE FROM smf_topics WHERE ID_MEMBER_STARTED = <id>;

So if you want to remove all topics and msg from the user id 100, you should do:

Code: [Select]
DELETE FROM smf_messages WHERE ID_MEMBER = 100;
DELETE FROM smf_topics WHERE ID_MEMBER_STARTED = 100;