MyBB Community Forums

Full Version: Bring back a deleted account?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Let's say I deleted an account, and the person re-registered. Is it possible to fuse the new account with the deleted account? (basically getting all the posts/stats back)
The deleted account's posts are still intact.
You'll have to set the new UID to the old UID.
(2010-11-24, 04:12 AM)Scoutie44 Wrote: [ -> ]You'll have to set the new UID to the old UID.
How do I do that?
You'll have to reassign the old posts to the new account; the only thing to go by once the account is deleted, is the username though. So you want UPDATE mybb_threads/posts SET uid=123 WHERE uid=0 AND username='Oldname' or something like that. And then Recount&Rebuild all counters.

If there were guests who at one point used the same name as the registered user, the guest posts will also be assigned to the user though.

The alternative is selectively restoring the users old data from a backup file.

Either way you'll have to do that manually and you should know a little SQL to do that. Make a backup before you break your forum with a bad SQL command. Smile
(2010-11-24, 11:54 AM)frostschutz Wrote: [ -> ]You'll have to reassign the old posts to the new account; the only thing to go by once the account is deleted, is the username though. So you want UPDATE mybb_threads/posts SET uid=123 WHERE uid=0 AND username='Oldname' or something like that. And then Recount&Rebuild all counters.

If there were guests who at one point used the same name as the registered user, the guest posts will also be assigned to the user though.

The alternative is selectively restoring the users old data from a backup file.

Either way you'll have to do that manually and you should know a little SQL to do that. Make a backup before you break your forum with a bad SQL command. Smile
EDIT:
phpMyAdmin accepted the SQL command, but the accounts still aren't fused.
What query you have ran ?
UPDATE mybb_threads SET uid=123 WHERE uid=0 AND username='Oldname'
UPDATE mybb_posts SET uid=123 WHERE uid=0 AND username='Oldname'
(2010-11-24, 11:54 AM)frostschutz Wrote: [ -> ]And then Recount&Rebuild all counters.

(2010-11-27, 08:23 PM)AJS Wrote: [ -> ]
(2010-11-24, 11:54 AM)frostschutz Wrote: [ -> ]And then Recount&Rebuild all counters.
I did that as well.
Can someone move this to 1.6?
Pages: 1 2