Delete Pots From User Deleted »  Show posts from    to     

Icy Phoenix


Old Support Topics - Delete Pots From User Deleted



Anakin [ Mon 18 Apr, 2011 11:50 ]
Post 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]


batman [ Mon 18 Apr, 2011 15:50 ]
Post subject: Re: Delete Pots From User Deleted
I would like to know this one too, very useful.


Informpro [ Mon 18 Apr, 2011 18:24 ]
Post subject: Re: Delete Pots From User Deleted
Well ... Give me the error you get and I'll look at how you can fix it.


Anakin [ Mon 18 Apr, 2011 20:15 ]
Post 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


mort [ Tue 19 Apr, 2011 06:02 ]
Post 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.


spydie [ Tue 19 Apr, 2011 09:01 ]
Post 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: [Hide]
  1. UPDATE `ip_posts` DELETE `*` WHERE `USER_ID`=XXX;  


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


Informpro [ Tue 19 Apr, 2011 10:54 ]
Post subject: Re: Delete Pots From User Deleted
Use
Code: [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.


spydie [ Tue 19 Apr, 2011 11:02 ]
Post 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


Informpro [ Tue 19 Apr, 2011 11:20 ]
Post subject: Re: Delete Pots From User Deleted
It says "inactive user", that's another IP feature.


mort [ Tue 19 Apr, 2011 11:39 ]
Post 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 - - -



Informpro [ Tue 19 Apr, 2011 16:40 ]
Post 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 ?


spydie [ Tue 19 Apr, 2011 18:32 ]
Post 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,

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


Informpro [ Tue 19 Apr, 2011 18:43 ]
Post 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().


spydie [ Tue 19 Apr, 2011 20:25 ]
Post 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


mort [ Wed 20 Apr, 2011 15:43 ]
Post 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: [Hide] [Select]
DELETE FROM ip_posts WHERE post_username= "informpro" AND poster_id= -1;


Just change informpro to whatever the user handle is.

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


Informpro [ Wed 20 Apr, 2011 16:06 ]
Post subject: Re: Delete Pots From User Deleted
No - the thread won't be removed. You'll only have a thread with an unexistant first post - which may lead to some inconsistences or bug, I myself don't know ...


mort [ Thu 21 Apr, 2011 02:32 ]
Post subject: Re: Delete Pots From User Deleted
Informpro wrote: [View Post]
No - the thread won't be removed. You'll only have a thread with an unexistant first post - which may lead to some inconsistences or bug, I myself don't know ...


Sure you'll have inconsistencies but that's what phpMyAdmin and Icy Db maintenance is there for.

For example:

I both checked and analysed the Db after the user was deleted 32 times and found no problems. Cleared the cache and the user totally disappeared.

Run Db Maintenence:

Spoiler: [ Show ]


What else can one do?


Informpro [ Thu 21 Apr, 2011 10:59 ]
Post subject: Re: Delete Pots From User Deleted
After running DB maintenance I guess that perfectly works ;-).


Anakin [ Mon 02 May, 2011 20:20 ]
Post subject: Re: Delete Pots From User Deleted
well, thanks for all, but another question.
When I deleted an user, the name of user still appears in his post.

How can I delete or change this name by XXXXX?

So this way i can erase all about this user.

regards


mort [ Tue 03 May, 2011 05:37 ]
Post subject: Re: Delete Pots From User Deleted
I'm absolutely unsure of what this thread was all about unless you need step by step instructions on how to do this or that?

Or you haven't read any of it - Or simply don't understand it?




Powered by Icy Phoenix