View Full Version : Guest to member
NS_007
03-13-2008, 03:21 AM
I was wondering if someone might help me with a script or something (I am clueless) to change former members that are now guests, BACK into members?
I have, in the past, deleted members missing in action for longer than 6 months. But recently, a well loved member died and I am getting a few requests for these folks to re-register, some wishing they still had posts linked to them.
No rush, but it would be nice if someone could help me. :D
Thanks in advance!
Lynne
03-13-2008, 03:23 AM
You can't change them back. When you delete a user, the whole line with all of their information gets deleted.
I have heard of people having people register and then going through and manually changing the posts to have the new userid, but I don't know what the queries were or how difficult that would be for you.
NS_007
03-13-2008, 03:48 AM
Sorry, wasn't clear. ;)
No I wasn't expecting all the stats etc to come back, just re-linking the posts with their names on them to revert to their new registration/name.
I'd do it manually, but that could take HOURS/DAYS, I was hoping for a query of some sort to associate the "old_now_guest_name" posts to the "new_not_guest_name" posts.
*shrugs*
SEOvB
03-13-2008, 03:49 AM
try using some of the maintence tools to rebuild the posts information and the such
Marco van Herwaarden
03-13-2008, 07:33 AM
Create a new account with the old name. Make a note of the new Userid.
Now run the following queries with the correct names and new userid:
UPDATE post SET userid = <New UserId> WHERE username = 'OLD USERNAME' AND userid = 0;
UPDATE thread SET postuserid = <New UserId> WHERE postusername = 'OLD USERNAME' AND postuserid = 0;Not tested, make a backup before running manual queries.
NS_007
03-13-2008, 02:49 PM
Oh wonderful! Thank you so much Marco!
Knightmane
03-13-2008, 03:40 PM
I was redirected to this solution, but upon trying it out, the following error was produced...
An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'vulpes.post' doesn't exist
Can you explain what would be causing that?
Lynne
03-13-2008, 03:48 PM
You probably have a prefix in front of your table names. So, you need to modify the query to include your prefix (it's in your config.php file).
NS_007
03-13-2008, 04:02 PM
Odd, I had no issues what so ever, worked a charm.
Hope you can get help!
Knightmane
03-13-2008, 09:48 PM
Issue resolved. Thanks to everyone who lent a suggestion. Especially to Lynne (here) and KW802 (on vBulletin.com).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.