|
Page 1 of 2
|
Anakin
Joined: August 2006
Posts: 46
Location: Córdoba, oju, que caló.
|
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]
____________ Thanks for all your work...
|
#1 Mon 18 Apr, 2011 11:50 |
|
Sponsors
|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
batman
Karl
Joined: February 2011
Posts: 162
Location: Cornwall UK
|
Re: Delete Pots From User Deleted
I would like to know this one too, very useful.
|
#2 Mon 18 Apr, 2011 15:50 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
Re: Delete Pots From User Deleted
Well ... Give me the error you get and I'll look at how you can fix it.
|
#3 Mon 18 Apr, 2011 18:24 |
|
Anakin
Joined: August 2006
Posts: 46
Location: Córdoba, oju, que caló.
|
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
____________ Thanks for all your work...
|
#4 Mon 18 Apr, 2011 20:15 |
|
mort
Spam Basher
Joined: August 2010
Posts: 998
Location: Up a tree
|
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
You may have to update the database with something like this
UPDATE `ip_posts` DELETE `user`='whatever' WHERE `user`=whatever;
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.
|
#5 Tue 19 Apr, 2011 06:02 |
|
spydie
Joined: December 2008
Posts: 1796
Location: In the Boxes
|
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
- UPDATE `ip_posts` DELETE `*` WHERE `USER_ID`=XXX;
replace ip with your prefix, and replace XXX with the user ID ( number)
____________ Out of Order
|
#6 Tue 19 Apr, 2011 09:01 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
Re: Delete Pots From User Deleted
Use
- 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.
|
#7 Tue 19 Apr, 2011 10:54 |
|
spydie
Joined: December 2008
Posts: 1796
Location: In the Boxes
|
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
____________ Out of Order
|
#8 Tue 19 Apr, 2011 11:02 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
Re: Delete Pots From User Deleted
It says "inactive user", that's another IP feature.
|
#9 Tue 19 Apr, 2011 11:20 |
|
mort
Spam Basher
Joined: August 2010
Posts: 998
Location: Up a tree
|
Re: Delete Pots From User Deleted
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 - - -
|
#10 Tue 19 Apr, 2011 11:39 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
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 ?
|
#11 Tue 19 Apr, 2011 16:40 |
|
spydie
Joined: December 2008
Posts: 1796
Location: In the Boxes
|
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
____________ Out of Order
|
#12 Tue 19 Apr, 2011 18:32 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
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().
|
#13 Tue 19 Apr, 2011 18:43 |
|
spydie
Joined: December 2008
Posts: 1796
Location: In the Boxes
|
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
____________ Out of Order
|
#14 Tue 19 Apr, 2011 20:25 |
|
mort
Spam Basher
Joined: August 2010
Posts: 998
Location: Up a tree
|
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 ?
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.
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 `
|
#15 Wed 20 Apr, 2011 15:43 |
|
|
Page 1 of 2
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
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
|
|
|
|