The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
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?
|
|
#2
|
|||
|
|||
|
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 fetch userdata create User data manager set existing set new username save |
| Благодарность от: | ||
| nlpc | ||
|
#3
|
|||
|
|||
|
How would I do that?
I'm not familiar with writing scripts like that |
|
#4
|
||||
|
||||
|
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
|
| Благодарность от: | ||
| nlpc | ||
|
#5
|
|||
|
|||
|
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? |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|