View Full Version : Custom Profile Fields
Twilkey
08-10-2011, 06:48 PM
Can someone tell me if vBulletin has a way to grab a specific users profile field, say field18, in php? Or if vBulletin does not have a built in function, where in the database is the value saved for the specific user?
You can call fetch_userinfo() in includes/functions.php. You're not talking about the "current" user, right, because then it would already be in $vbulletin->userinfo['field18']. Also, if you need it in the postbit for that user's post, it will be in $post['field18'].
nhawk
08-10-2011, 07:05 PM
Thank you!
You just saved me a database query in a new project. ;)
Thank you!
You just saved me a database query in a new project. ;)
Cool...of course fetch_userinfo() does a query if the user's info isn't already cached. But at least you don't have to write the query.
nhawk
08-10-2011, 07:18 PM
Cool...of course fetch_userinfo() does a query if the user's info isn't already cached. But at least you don't have to write the query.
Oh it's there. It deals with logged in users. ;)
It never dawned on me that custom fields would be in the userinfo.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.