1
indream
When i delete an user...
  • 2005/2/15 16:23

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


hi

When i delete an user, i want to be deleted all of private messages and comments of that user. can any people helping me ?

2
Herko
Re: When i delete an user...
  • 2005/2/15 16:27

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


You can only do that manually using a MySQL management tool like phpMyAdmin or MySQLFront. ANd you will have to write the MySQL queries yourself too. Probably something like:
DELETE * WHERE uid=[insert user ID of user you want to delete all posts from], in the correct tables. I'm no developer tho, so don't use this as an example, especially on a live website.

Herko

3
indream
Re: When i delete an user...
  • 2005/2/16 11:24

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


some code ?

4
m0nty
Re: When i delete an user...
  • 2005/2/16 13:49

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


private messages would need something like:

in phpmyadmin:

DELETE * FROM xoops_priv_msgs WHERE to_userid =

replace XOOPS in the table name with the prefix from your XOOPS install (leave as XOOPS if you haven't changed it) and then replace with the user id of the user you deleted.. so it looks something like:

DELETE * FROM xoops_priv_msgs WHERE to_userid = 5

for the comments >

DELETE * FROM xoops_xoopscomments WHERE com_uid =

i don't know the full implications and whether other things may link to/from them, so it would be best to try this on a test server before doing it on a production site..

Login

Who's Online

243 user(s) are online (48 user(s) are browsing Support Forums)


Members: 0


Guests: 243


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits