The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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? |
#2
|
||||
|
||||
try $post[userid] ?
|
#3
|
||||
|
||||
No, that doesn't work either . AFAIK that displays the id of the person who posted the post in a thread.
|
#4
|
||||
|
||||
$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 |
#5
|
||||
|
||||
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. |
#6
|
||||
|
||||
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.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|