How to recover user in the database

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
ttfan
Registered User
Posts: 23
Joined: Sun Jan 27, 2013 10:39 am
Contact:

How to recover user in the database

Post by ttfan »

There seems to have some hickup with my server, and as a result a user (or more) seems to have been deleted.

Although the username still shows up in the 'view active topics' list, when I click on the username, it tell me the user does not exist (although this does give me the userID number). His posts (old & new) seem to have disappeared as well. When I search for username ACP, it does not find the member.
I've checked the admin & moderator logs, and the user was NOT deleted.
I ran the database repair, but nothing was recovered.
I assume the information is still in there somewhere, so I'm hoping there's just something in the database that got corrupted that can be fixed.
How can I find the details of this persons in the database, to check if he's still there, and fix any incorrect settings?

Hope someone can help, as I've not done anything like this before.

Thanks a lot!
ttfan
Registered User
Posts: 23
Joined: Sun Jan 27, 2013 10:39 am
Contact:

Re: How to recover user in the database

Post by ttfan »

Anyone please?
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: How to recover user in the database

Post by RMcGirr83 »

Everything is stored within the database. Only way to retrieve something from the database is to have a backup of that database. Seems as though, maybe, your host restored a database from a backup when the user didn't exist?

There is no way to retrieve information from a database unless you have a backup that had the information within it.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: How to recover user in the database

Post by janus_zonstraal »

Did you look into the database if the user name still exist ?
use his userID number to find the correct row
Sorry! My English is bat ;) !!!
ttfan
Registered User
Posts: 23
Joined: Sun Jan 27, 2013 10:39 am
Contact:

Re: How to recover user in the database

Post by ttfan »

THanks for the info!

Yes I do have backups of the database, which gets older by the days of course.

My host did not restore a database from a backup, they simply repaired the database. I can't see how a server glitch could delete the account of a user plus all their posts as well (they had thousands of posts starting several years ago), so I expect the information is still in there somewhere.

How do I check if the user is still in the database? I've never messed around with the database before. The user number that's missing is 14116

I can go into phphmyadmin and select the database, but which table do I search in?
Is it in acl_users?
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: How to recover user in the database

Post by janus_zonstraal »

The users are in the "user" table

You can also do a search for user or ID
https://www.hostgator.com/help/article/ ... phpmyadmin
Sorry! My English is bat ;) !!!
ttfan
Registered User
Posts: 23
Joined: Sun Jan 27, 2013 10:39 am
Contact:

Re: How to recover user in the database

Post by ttfan »

I've searched for the user ID and username in the user table, it does not find anything.

The member has been posting for several years, with thousands of posts.

Surely it's not likely all his posts are suddenly ALL deleted? Is it not more likely they're still in the database somewhere, but it's not showing since some setting in the database is not right?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to recover user in the database

Post by stevemaury »

Search the posts table for posts with his user_id. Easiest way to do that is to sort on the poster_id column.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: How to recover user in the database

Post by janus_zonstraal »

Try to do a search for one of his post in the "post" table
Normally the "poster_id" is the 4 kolom

:lol: Steve was 5minits earlier
Sorry! My English is bat ;) !!!
ttfan2
Registered User
Posts: 1
Joined: Wed Jun 14, 2017 12:50 am
Name: Alex
Contact:

Re: How to recover user in the database

Post by ttfan2 »

Thanks guys!

I've tried that, and found that all the posts are still there, which is good news!

So it seems only the user profiles were deleted.

I've asked the users (who had their profiles deleted), to create new accounts.

Once this is done, can I simple change their userID to the userID they had before (via PHPmyAdmin), to link their new profile to all their old posts & PMs? Or is more required to assign their old posts to their new profile?
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: How to recover user in the database

Post by janus_zonstraal »

Once this is done, can I simple change their userID to the userID they had before (via PHPmyAdmin), to link their new profile to all their old posts & PMs?
That is the easiest way I think
Just try it, you can always reverse it

But make a backup before you start!
Sorry! My English is bat ;) !!!
ttfan
Registered User
Posts: 23
Joined: Sun Jan 27, 2013 10:39 am
Contact:

Re: How to recover user in the database

Post by ttfan »

Happy to report that it worked! :mrgreen:

The only other thing I need to do was update their post count, or else it would not display the right stats in their profile.
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: How to recover user in the database

Post by janus_zonstraal »

Great :D
Sorry! My English is bat ;) !!!
User avatar
eunaumtenhoid
Registered User
Posts: 1007
Joined: Wed Jun 03, 2009 12:46 am
Location: ????

Re: How to recover user in the database

Post by eunaumtenhoid »

I have this problem, but my database contains this user this problem has got how to recover?
My translations of the extensions for Brazilian Portuguese
https://github.com/phpBBTraducoes
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: How to recover user in the database

Post by janus_zonstraal »

and the poster_id and the name are correct?
Sorry! My English is bat ;) !!!
Locked

Return to “[3.1.x] Support Forum”