![]() |
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:
|
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. :)
|
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' |
All times are GMT. The time now is 09:49 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:
|