MyBB Community Forums

Full Version: reassign posts to user after deleting the user
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

by an accident I deleted one of our users and now I have to reassign the posts to the fresh created account with the same name as before. How can I do that?
Best way to do this would be to change the uid of the fresh account to the old one. The easiest way to do this is through phpMyAdmin.

Obviously you'll need to find the old uid first. You can find this by looking at the posts of the old user in phpMyAdmin and looking at the uid in that row.

If you want me to take a look for you send your details either by PM or through the Private Inquiries forum Smile
I searched for those details in the mybb_posts and saw that the old user has a '0' in the uid column. Then I changed the uid for this user in the mybb_users table to '0' but then the system says that this user profil is invalid/not existing.
UID can't be 0. Maybe its assigned as 0 once you delete a user.
Ah that is because 0 means unregistered Toungue
Just a mo looking about how you could get the uid back.

Do you have any db backups btw, restoring that might be easier if its recent?
It's only about 7 posts, so making it manually would be easier. But the member list says he has 7 posts now but he's unregistered.
Ah in your admin log it should give you the uid you deleted Smile
If you change the uid of the user then the posts should link to that user as they too are linked to the uid.
Ha, your idea was good and fine working. Logs are soo good! Smile Thanks, it works now!