![]() |
Getting Userid
I would like to use the userid field in a query in order to place the users custom field information in specified places on the member.php page.
I've tried using: $vbulletin->userinfo[userid] and $userinfo[userid] but both display my userid on every page, instead of the actual users id of the profile. How would I instead call the user id of the profile instead of the user id of the viewer? |
try $post[userid] ?
|
Quote:
|
$userinfo[userid] is the userid of the profile you are viewing
$bbuserinfo / $vbulletin->userinfo [userid] is for the current user $post[userid] is the poster's id etc |
I see my mistake... I was attempting to assign $userinfo[userid] to a variable as a plugin. When inserting $userinfo[userid] into the actual member.php template it displays the user id.
I'm still unsure why I cannot insert it into a variable in a plugin, but this works better for me anyway. Thanks to all who helped. |
Which hook are you using for your plugin? The variable may be defined later, or you could be inside a class/function meaning it's not in scope.
|
All times are GMT. The time now is 02:44 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:
|