Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2008, 03:21 AM
NS_007 NS_007 is offline
 
Join Date: May 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Guest to member

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.

Thanks in advance!
Reply With Quote
  #2  
Old 03-13-2008, 03:23 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 03-13-2008, 03:48 AM
NS_007 NS_007 is offline
 
Join Date: May 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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*
Reply With Quote
  #4  
Old 03-13-2008, 03:49 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try using some of the maintence tools to rebuild the posts information and the such
Reply With Quote
  #5  
Old 03-13-2008, 07:33 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

[sql]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;[/sql]Not tested, make a backup before running manual queries.
Reply With Quote
  #6  
Old 03-13-2008, 02:49 PM
NS_007 NS_007 is offline
 
Join Date: May 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh wonderful! Thank you so much Marco!
Reply With Quote
  #7  
Old 03-13-2008, 03:40 PM
Knightmane's Avatar
Knightmane Knightmane is offline
 
Join Date: Dec 2005
Location: USA
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 03-13-2008, 03:48 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #9  
Old 03-13-2008, 04:02 PM
NS_007 NS_007 is offline
 
Join Date: May 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Odd, I had no issues what so ever, worked a charm.

Hope you can get help!
Reply With Quote
  #10  
Old 03-13-2008, 09:48 PM
Knightmane's Avatar
Knightmane Knightmane is offline
 
Join Date: Dec 2005
Location: USA
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Issue resolved. Thanks to everyone who lent a suggestion. Especially to Lynne (here) and KW802 (on vBulletin.com).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:10 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04546 seconds
  • Memory Usage 2,240KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete