Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 25 May 2017, 23:19
grey_goose grey_goose is offline
 
Join Date: Jun 2009
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by grey_goose; 25 May 2017 at 23:33.
Reply With Quote
  #2  
Old 25 May 2017, 23:32
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
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.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #3  
Old 26 May 2017, 02:30
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Woof, captain of the S.S. Failboat here.

'char_userid' isn't set yet. Changed to char_name = $getusername worked like a champ.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 16:15.

Layout Options | Width: Wide Color: