vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Custom Profile Fields (https://vborg.vbsupport.ru/showthread.php?t=268330)

Twilkey 08-10-2011 06:48 PM

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?

kh99 08-10-2011 07:00 PM

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. ;)

kh99 08-10-2011 07:08 PM

Quote:

Originally Posted by nhawk (Post 2231941)
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

Quote:

Originally Posted by kh99 (Post 2231942)
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.

kh99 08-10-2011 07:19 PM

Ah...I get it now.


All times are GMT. The time now is 04:12 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
  • Page Generation 0.01093 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete