![]() |
Help with a mysql query - replacing field
Can anyone help me? I want to give everyone using my forum a new username, based on their real name. Their real name is stored in the database as two custom fields. So I want to replace all existing usernames with [customfield1]_[customfield2].
That's their firstname_lastname. (e.g. Jane_Doe). Does that make sense? Anyone know how to do it? :) |
You could change the user table with a query, but there are a bunch of other tables that have a username. I think the best thing to do would be to write a script that uses the data manager to change the username. It would basically be
Code:
for each user |
How would I do that?
I'm not familiar with writing scripts like that |
Can't you use the replcement variable manager? so say find text "[musername]" and replace with "[customfield1]_[customfield2]"
I've never used it but it's just a thought :) |
That would be really great but I don't think all the vbulletin pages get the customfield data. It's pulled into showthread but I don't think it's pulled into all pages.
I would be even happier to do it that way if I could make the pages get the data. Anyone know how? |
All times are GMT. The time now is 07:18 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|