vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Guest to member (https://vborg.vbsupport.ru/showthread.php?t=172870)

NS_007 03-13-2008 03:21 AM

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. :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:

[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.

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).


All times are GMT. The time now is 08:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00949 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete