Log in

View Full Version : $userinfo in plugin?


zivester
08-26-2008, 09:46 PM
What is the equivalent of $userinfo outside of the templating system? $vbulletin->userinfo is actually $bbuserinfo from what I can tell.

I'm trying to get $userinfo->[field8] in one of my plugins, but all I can access is the actual logged in user (usually $bbuserinfo) as $vbulletin->userinfo.

I wish there was a general howto for something like this.

RLShare
08-26-2008, 09:52 PM
What part of the site are you trying to access the information in?

zivester
08-26-2008, 09:55 PM
User Profile (member.php)

Dismounted
08-27-2008, 07:59 AM
Use either one from:
$userinfo['field8']
$prepared['field8']

zivester
08-27-2008, 02:10 PM
wow... that easy...

So $vbulletin->userinfo is the logged in user
and $userinfo is the page of the currently viewed user...

just to clarify for others. I'm guessing this is the case for site wide (although $userinfo wouldn't be defined unless we were on a member page)