Previous Thread
Next Thread
Print Thread
Rate Thread
#286214 05/08/2006 8:05 PM
Joined: Nov 2001
Posts: 126
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 126
Hi All,

Looks like one of our moderators went and deleted a couple of users he was having a problem with.. one has thousands of posts...

Is there a known way to undelete a user at all?

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
If you know his basic info (username, number, post count) you can re-insert them back into the database.


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 126
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 126
hmm..

I don't suppose you already had something written up on which tables to do that with, do you?

Either way, thanks :-)

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Sure, it's a little involved tho You'd use this snippet from adduser.php (assuming your table prefix is w3t_). Backup your data before attempting this tho

Code
<br />	INSERT INTO `w3t_Users` (U_LoginName,U_Username,U_Password,U_Email,U_Totalposts,U_Laston,U_Status,U_Registered,U_RegEmail,U_RegIP,U_Groups,U_Title,U_Color,U_Privates,U_Approved,U_CoppaUser)<br />	VALUES ('$Login_q','$Displayn_q','$crypt','$Email_q','0','$date','$Status_q','$date','$Email_q','$ip_q','$Groups_q','$Title_q','$Color_q','1','$approved','$coppauser'{$regvalues});<br />


You'll need to change each field in the VALUES line to match whatever data you are wanting to add back in. Untested but should work


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 126
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 126
hmm.. did all that and no go.. it kept telling me I had an error on line two at "

I tried recreating his account on the board and re-assigning his username to his old Member number.. but all of his posts are still labeled as anonymous.

Do all those posts still have the member ID # attached to them? If so, I wonder why re-assigning that member number to his name didn't recorrect it.

By the way, I am not sure how this happened. But apparently, even with the "edit users" function off in the control panel for moderators, they are still able to delete a users account through the "ban user" screen.

I've considered rolling the board back, or at least re-importing the w3t_users table, but for the life of me cannot figure it out, so I am waiting on my SysOp, and hoping he gets back to me soon.

Random question, does anyone have a hack for adding a restore feature for admins only through the board? I am getting a crash course in MySQL from this, but it would be nice to have anyways.

Any more thoughts on the above?

And *THANK YOU Allen and threadsdev!*

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Some of that will depend if your current install has extra fields or not, but here's what I used to insert a user here accidently deleted a while back:

Code
<br />INSERT INTO w3t_Users VALUES ('username','password','[email protected]','','1','','sig','homepage','occupation','','location','','User','flat','collapsed','15','usernumber','On','On','','78','20','','','','','','926481467','on','','on','yes','on','yes','','','','english','','99','','','usedefault','7','2','','','','yes','yes','45','9','5','80','80','','yes','default','','On','plaintext','','','','0','','0','0','','0','','','','','','','','','','','');<br />


most of those are default settings, but you'll need to add the user's info - name, pass and especially usernumber.

Now, if the user's posts are attibuted to anonymous, then you'll have to manually edit each post to re-add the user's number back into the post table. smirk


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)