The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Populating custom userfields on registration
I run an RPG forum and user accounts are both players -and- characters. I've got a table with character (characters) info and I want to check it to see if a new account is for a character and if it is to populate some custom userfields.
It doesn't work :P Taking a shot in the dark here, but is it because there's not a username/userid assigned yet? Is there some way to get the information or should I just add a query for the current MAX(userid), increment it, and use that? Or have I made some other mistake? hook location: register_addmember_complete PHP Code:
|
#2
|
||||
|
||||
Looking at the "register.php" script, it appears that the userid should already be in $vbulletin->userinfo['username'] at that hook location, however, you might try $userid and $username as well.
|
#3
|
|||
|
|||
Woof, captain of the S.S. Failboat here.
'char_userid' isn't set yet. Changed to char_name = $getusername worked like a champ. Code:
WHERE char_userid = '$getuserid' |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|