[wp-hackers] deleting a user, save posts by him
amit at igeek.info
Thu Apr 7 06:53:11 GMT 2005
ah!! I should've made myself more clearer, no?
I know of these two methods, ie., via admin panel & MySQL. what I was asking is that I don't want to use any of these things, essentially, move the posts to another user.
I've a blog setup for someone who's not techy & has about 100-150 posts of a user he wants to delete. Now doing it through admin panel is out-of-question. And he can't do it via MySQL too. I can create a script for him to do that ofcourse, but does the posts really need to be assigned to another user? I mean he wants to keep the attribution of the posts to the original author, but don't want him to post again.
As I know of it(correct me if I'm wrong), a 0 level user can't post, right? So this can be overcome by simply making the author a 0 level user, which will stop him from posting but also keep his posts with proper attribution. Now the problem will arise when the number of such 0 level users increase. 1,2,3,4,5... its ok, but if they reach somewhere 50-60 or above, its gonna be messed up!!
so a solution should be there!! I mean there should be an option which allows the posts to remain with proper attribution while the user can be deleted.
|| Canned!! -- my Atropine || iG:Syntax Hiliter v2.01 ||
|| iGEEK.INFO || Free Nokia Ringtones || Online Gaming @ Games Planet ||
---------- Original Message from "Nikolay Bachiyski" <nbachiyski at developer.bg> ----------
First move all the posts to another user and then safely delete him/her
from userlist. Moving could be tough if both there are many posts of
this user and you do not to interact directly with the database ;)
So here are two ways of moving posts from user to user.
Numbr one.Go to Manage->Posts and for each post of this user change the
owner to the user of your preference. No, I do not know how to do this
with the 500 post of the user :)
The second way of moving - in a mysql console execute:
UPDATE <db prefix>_posts SET post_author=<id of the move-to user> WHERE
post_author=<id of the to-be-deleted user>.
You can get user ids from the Users section in the administration.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wp-hackers