If you acccidentally delete a user but not their posts, you can register a new account for that user, then run this query to associate the old posts with the new account:
UPDATE post SET userid='xxx' WHERE username='Old Name';
....with 'xxx' being the userid of the new account.
Then update the thread and forum counters in that order:
Admin CP -> Maintenance -> Update Counters
UPDATE post SET userid='xxx' WHERE username='Old Name';
....with 'xxx' being the userid of the new account.
Then update the thread and forum counters in that order:
Admin CP -> Maintenance -> Update Counters