Delete Pots From User Deleted


Goto page 1, 2  Next

Subject: Delete Pots From User Deleted
Hello, I deleted an user and I want to delete all post that this users wrote, but I can't do it, because this user doesn't exists.

How I can delete all post of this user?

Thanks.
[b]version of icy phoenix: 1.3.0.53a[quote]

Subject: Re: Delete Pots From User Deleted
I would like to know this one too, very useful.

Profile PM  
Subject: Re: Delete Pots From User Deleted
Well ... Give me the error you get and I'll look at how you can fix it.

Profile PM  
Subject: Re: Delete Pots From User Deleted
well, Simple I don't know how I can delete post of an user that he doesn't exit :?

Subject: Re: Delete Pots From User Deleted
Anakin wrote: [View Post]
well, Simple I don't know how I can delete post of an user that he doesn't exit :?


You may have to update the database with something like this

UPDATE `ip_posts` DELETE `user`='whatever' WHERE `user`=whatever;

Informpro wrote: [View Post]
Well ... Give me the error you get and I'll look at how you can fix it.


If you respond properly to Informpro's post - Like WHAT are the posts telling you in regard to the deleted user's handle and ID etc - You may just get the string you need to do it.

Though I'm surprised (and I'm also not sure) that Icy Phoenix doesn't give you that option when you delete the user.

Profile PM  
Subject: Re: Delete Pots From User Deleted
as munch as i know, Icy has´nt got the function.

Would be a n good idea, to include this in ACP

Icy normaly replaces the User_ID by anonimos in the front office, even if it mantains the User ID in the Database, it just changes The usergroup to -1 .

So you would have to search your DB Users Table for this user.

When you could run this consult in Phpmyadmin
Code: [Download] [Hide]
  1. UPDATE `ip_posts` DELETE `*` WHERE `USER_ID`=XXX;  


replace ip with your prefix, and replace XXX with the user ID ( number)

Subject: Re: Delete Pots From User Deleted
Use
Code: [Download] [Hide]
  1. DELETE `ip_posts` WHERE `USER_ID`=XXX; 
(BTW this is NOT the right way to do, you'll create many problems with topics / posts / ... You'd rather update ID to Anonymous.

Profile PM  
Subject: Re: Delete Pots From User Deleted
Icy is doing this by default

changing User-Group to anonimous

have a look for example for Lopalongs old posts here. it says anonimous

Subject: Re: Delete Pots From User Deleted
It says "inactive user", that's another IP feature.

Profile PM  
Subject: Re: Delete Pots From User Deleted
Informpro wrote: [View Post]
It says "inactive user", that's another IP feature.


Correct me if I'm wrong?

Anonymous is a "user" for all want and purposes and simply needs to exist. He has no posts or anything else in any of the Db post's tables etc?

So assuming that the "deleted" user's posts have been changed to anonymous, and IF I'm not wrong, then I don't see any problems with deleting anonymous posts.

:?:

Either way - All Anakin wants to know is can it be done and how to do it - And any deletion of any user should be the same irrespective of who's IP he's being deleted from.

IF I had IP running - I'd create a user - Post a couple - delete him / her and find out "exactly" what happens in the DB - But I don't - - -

:mryellow:

Profile PM  
Subject: Re: Delete Pots From User Deleted
Imagine you delete the first post of a thread (because the author of the thread has been deleted). Could you guess what will happen ?

Profile PM  
Subject: Re: Delete Pots From User Deleted
outsch.

i forgot about that.

to much code today, did´nt think in it

that defenitly would drive the db crazy


better leave it as is, :shock:

You might go through your Forum, and delet the hole Post ( with answers) or move them all to Trash Bin

afterwards purge the Trash Bin and you should be done.

I know, this is a lot of work, speacialy if the user was very active

Subject: Re: Delete Pots From User Deleted
I'll think and see how it may works, at least to give it to you. But this is not my priority, so you should better do that at hand.

EDIT : in my version of IP, I have, in functions_users_delete.php, a function named ip_user_kill().

Profile PM  
Subject: Re: Delete Pots From User Deleted
yep, thats the script that rewrites/updates all tables to user_name ANONIMOUS

but it want delet any post, only PM as far as I can see

Subject: Re: Delete Pots From User Deleted
Informpro wrote: [View Post]
Imagine you delete the first post of a thread (because the author of the thread has been deleted). Could you guess what will happen ?


You're right - It does remove the thread. :(

But! if anakin isn't worried about that, here's the string he will need to do it with.

Code: [Download] [Hide] [Select]
DELETE FROM ip_posts WHERE post_username= "informpro" AND poster_id= -1;


Just change informpro to whatever the user handle is. :mryellow:

It's also important that the name be inside quotes. "user name" and NOT `user name`

Profile PM  
Goto page 1, 2  Next

Page 1 of 2


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.1228s (PHP: 28% SQL: 72%)
SQL queries: 10 - Debug Off - GZIP Enabled