![]() |
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 |
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[]. |
what im trying to do is to insert a custom profile field of the thread starter on the navbar template.. any idea?
|
I think you can use
Code:
$userinfo = fetch_userinfo($threadinfo['postuserid']); then the value should be in $userinfo['fieldX']; |
All times are GMT. The time now is 03:13 PM. |
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:
|