PDA

View Full Version : About $vbulletin->userinfo['VAR']


JamesTalbot
05-22-2008, 02:42 PM
Hello,

I'm not sure how to explain this but here goes.

You know the "$vbulletin->userinfo" ? What do you call that? I know its like a class etc (right?) but how does it work? Of course i know how classes work but i'm not too sure how EXACTLY this works.

What i need is the same thing but with a different table? Not the users table but a different custom table which i have created. This will use the $vbulletin->userinfo['userid'] to define which USER.

If anyone understands me and can help that would be greatly greatly appreciated!

Thanks,

James

Opserty
05-22-2008, 03:56 PM
$vbulletin->userinfo is a class variable (more specifically an array) which contains information about the browsing user. It is populated automatically by vBulletin depending on who the user is.

I'm not sure what you are trying to do but you custom table data won't be added to it automatically, you need to edit/add your own query to fetch the data and add it.

JamesTalbot
05-23-2008, 07:58 AM
What im trying to do is have another table which works the same way as 'user' via the $vbulletin->userinfo but instead have it as $myleague->leagueinfo['POINTS'] ? w

Where abouts do i add the code for this? Maybe a hook?

Dismounted
05-23-2008, 10:50 AM
I would suggest reading up on OOP in PHP.

JamesTalbot
05-30-2008, 12:41 PM
In the class_core.php, there is this.


$this->userinfo = fetch_userinfo($this->vars['userid'], $useroptions, $this->vars['languageid']);


I have read up on OOP but i am posting this here because i wanted to know more about how this worked with vBulletin and asking people who know about it and have worked with it. Is there anyone that can ACTUALLY help me - maybe there are some vBulletin guides related to this sort of thing that can help me?

Thanks.

Dismounted
05-31-2008, 11:50 AM
It's all just simple PHP4-compatible OOP. $vbulletin->userinfo is just a variable containing an array (fetch_userinfo() returns an array).