The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
fetch user profile field from database
i want to create a plugin to fetch a user profile field from database..
what would be the code? thanks |
#2
|
|||
|
|||
If you want the value from the current user (the one viewing the page), then you don't have to do anything - the value will be $vbulletin->userinfo['fieldX'].
If you want the value for another user, then you can call fetch_userinfo(), like: Code:
$userinfo = fetch_userinfo($userid); and the value will be $userinfo['fieldX']. At some hooks (like ones associated with display a user's profile), the value might already be in $userinfo[]. |
#3
|
|||
|
|||
what im trying to do is to insert a custom profile field of the thread starter on the navbar template.. any idea?
|
#4
|
|||
|
|||
I think you can use
Code:
$userinfo = fetch_userinfo($threadinfo['postuserid']); then the value should be in $userinfo['fieldX']; |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|