PDA

View Full Version : Convert user names during import?



anthonym16
Mon 11th May '09, 4:06pm
I am importing a board from dotNetBB that uses AD authentication. Eventually, my vbulletin site will use AD authentication as well. The user names in dotNetBB are in the form [domain]\[username].

For example: localdomain\johndoe

What I need for my vbulletin board is just the user name. Can I edit anything in the impex code to filter out the domain name from the user name? Or should I just perform the import, then use a SQL query to filter out the domain name from the user name? If I go the SQL query route, are the user names just contained to the users table?

Thanks.

Wayne Luke
Wed 13th May '09, 10:26am
It would probably be easiest to use a SQL query with a regular expression after the import. The User Name would also be located in the Thread and Post tables due to denormalization for performance. However you can update the thread and post information in the Admin CP after running the query.

anthonym16
Wed 13th May '09, 10:41am
Here's the SQL query I used:


update user set username = replace(username,'localdomain\\','');After updating the thread and post info in the admincp, everything is great.

Thanks!