View Full Version : Mass username change
WavMixer
06-25-2009, 07:00 PM
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?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.