PHPBB Auto User Pruning - how do I undo it?
March 3, 2014 8:15 PM   Subscribe

I run a forum where we discuss open source book scanning technology. Many users visit only occasionally. In a recent update, PHPBB enabled a feature called "Auto User Pruning", and it deleted users who had not logged in for 24 months. Two Thousand Users were deleted. It did not delete their posts, and their account names are still attached to their posts. Please help me restore these users from my database backups or via some other method.
posted by fake to Computers & Internet (5 answers total)
There is a support toolkit / second level administration panel that could help you with this if it still works with the new version.
posted by srboisvert at 8:21 PM on March 3, 2014

Any idea how to use it? I'm working on installing it.
posted by fake at 8:36 PM on March 3, 2014

The STK made things worse- restoring users with that tool resets their passwords AND replaces their email with the email of user#1. I'm going to have to go back to the DB and fix that somehow.
posted by fake at 9:23 PM on March 3, 2014

This isn't really an answer, but I'm not really seeing the problem, I guess. The posts are still there, with due attribution to their authors. so the knowledge, as well as the attribution, is preserved. The worst case scenario, as far as I can see, is that someone who posted 2+ years ago would return to the site and want to post again and find that they had to create a new account. Meanwhile, you've purged 2K inactive (by any reasonable definition) users from the database.
posted by bricoleur at 9:23 PM on March 3, 2014

I'm not familiar with the guts of PHPBB, but I do know the guts of other php forum software, and in that, deleting the user actually deletes the row in the member database table, keeping only the username field in the message table, and setting the user id to 0. Which means the user is really, truly gone. So, the first thing to do is put your forum in maintenance mode immediately, so your users aren't busy generating more content while you figure this out.

Done that?

Next, do you do your own backups, or are they automatically managed for you by your hosting service? Do you know how many backups are saved before they roll over? You want to do a backup right after going into maintenance mode IF you're certain you won't overwrite the most recent backup that has all of your deleted users in it. How big is your backup? Is it gigs and gigs?

Ok, then what you want to figure out next, is whether it's really important to restore the old users. Is it important enough to roll back your database to however many hours or days ago that the deletion occurred, losing newer content? If so, just roll back your database changes (you may be able to get your hosting service tech support to help) and your code base to just before the upgrade. If not, and you want to try to combine your old user data with new content AND a presumed software upgrade that might contain database model changes, you have a much harder problem. I'd suggest googling like mad (check StackOverflow) to see what others are doing for this problem, and probably resign yourself to hiring a PHPBB contractor to straighten you out, strand by strand. Again, I'm not familiar with PHPBB, but othe fora support boards are riddled with pretty competent (sometimes old code contributor) programmers or DBAs who know the guts of the system, and may be best able to help you. Actually, if it were me, I would definitely do this experimenting on a duplicate test server, NOT your live server. It would be easy to make this much worse than it already is.
posted by instamatic at 4:03 AM on March 4, 2014 [1 favorite]

« Older What was that novel that mentions grissini as a...   |   Why no alcohol content info on the wine label? Newer »
This thread is closed to new comments.