vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Mass username change (https://vborg.vbsupport.ru/showthread.php?t=217128)

WavMixer 06-25-2009 07:00 PM

Mass username change
 
I was asked by a friend to build a vBulletin site and populate the user base with information provided via an Excel spreadsheet. This friend requested that all of the user names be their email address, although I recommended they used something else. Now that the site is completely populated, they agree that we should not have used an email address for the user name. I know there has to be a better way to change all usernames without having to manually change each user.

Any suggestions?

James Birkett 06-25-2009 07:22 PM

I would suggest a php script to inject the mysql names and overwrite the current usernames.. (or an sql query?). That means each username has to correspond to each current username however and it could be difficult. I can't see it being possible via the admin CP or anything else that is built-in, except sql database edits. Maybe you should back up your database, open it in a suitable program, sort it in the same order as is sorted in your excel spreadsheet (i.e. by e-mail, as your usernames are the e-mails right?), overwrite each one then re-inject the database.
I know that might be hard to understand - see if you understand it :p

WavMixer 06-25-2009 08:17 PM

I have added additional fields to the user profile for first name and last name. I would like to merge the two fields so that firstname lastname replace the current username. I have downloaded the user table as a CSV file, opened the file in Excel and preformed the merge. Now all I need to do is replace the existing user table with the modified table, however the table is in CSV format.

Carnage 06-25-2009 08:34 PM

IT'd be easier to do it in SQL

but phpmyadmin will allow you to insert from csv

jchamber2010 06-25-2009 08:59 PM

I believe it will... or does it only export to CSV?


All times are GMT. The time now is 04:47 PM.

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.01013 seconds
  • Memory Usage 1,709KB
  • 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
  • (5)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