Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 10 Aug 2011, 20:48
Twilkey's Avatar
Twilkey Twilkey is offline
 
Join Date: Oct 2006
Custom Profile Fields

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?
Reply With Quote
  #2  
Old 10 Aug 2011, 21:00
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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'].
Reply With Quote
  #3  
Old 10 Aug 2011, 21:05
nhawk nhawk is offline
 
Join Date: Jan 2011
Thank you!

You just saved me a database query in a new project.
Reply With Quote
  #4  
Old 10 Aug 2011, 21:08
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by nhawk View Post
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.
Reply With Quote
  #5  
Old 10 Aug 2011, 21:18
nhawk nhawk is offline
 
Join Date: Jan 2011
Originally Posted by kh99 View Post
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.
Reply With Quote
  #6  
Old 10 Aug 2011, 21:19
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Ah...I get it now.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:11.

Layout Options | Width: Wide Color: