vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   $vbulletin->userinfo['field11'] Doesn't Work (https://vborg.vbsupport.ru/showthread.php?t=209331)

myHybridcar.com 03-24-2009 08:22 PM

$vbulletin->userinfo['field11'] Doesn't Work
 
I was under the impression that custom profile fields would populate within $vbulletin->userinfo, yet a print_r does not show any of my custom fields.

How can I make $vbulletin->userinfo['field11'] functional? Thanks!

Lynne 03-24-2009 09:02 PM

What page are you trying to use it on? It may be called something else there.

TigerC10 03-24-2009 09:12 PM

Well, you can always try:

$bbuserinfo['field11']

Sometimes that's defined.

myHybridcar.com 03-24-2009 10:14 PM

Well, it's actually in a separate script but I've included global.php and $vbulletin is populated. I did a search for "field11" and the value but it wasn't anywhere to be found.

Also, $bbuserinfo wasn't populated.

ragtek 03-24-2009 10:28 PM

Quote:

Originally Posted by TigerC10 (Post 1776160)
Well, you can always try:

$bbuserinfo['field11']

Sometimes that's defined.

I wouldn't say that!

$vbulletin->userinfo is always in the scope

maybe the problem is, that your session isn't actual, so that you're a guest and guests don't have userfields;)


try this:

PHP Code:

if (!$vbulletin->userinfo)
{
    
standard_error('not logged in');
}
else
{
    die(
print_r($vbulletin->userinfo));


So you'll see if your logged in and if yes, you'll see the whole userinfo array. Search for field11.
Maybe it's empty

myHybridcar.com 03-24-2009 10:37 PM

No, no. $vbulletin->userinfo is populated just fine. I'm logged in. The problem is that the custom fields just aren't included in $vbulletin-userinfo.

Lynne 03-24-2009 11:54 PM

Are ou sure $vbulletin is global at that point? Maybe you are using the wrong term to get the field.

myHybridcar.com 03-25-2009 12:32 AM

Yes, it's global. Again, it's fully populated. $vbulletin->userinfo['userid'] works.

TigerC10 03-25-2009 12:35 AM

You might have a broken plugin. It could be causing your $vbulletin object to terminate early with an error, which causes the userinfo to be incomplete.

Try disabling your mods one at a time and refresh your print_r page until your userinfo is complete.

Be sure to clear your cache between refreshes...

Firefox: Hold SHIFT and press the refresh button on the toolbar
Internet Explorer: Hold CTRL and press the refresh button on the toolbar

myHybridcar.com 03-25-2009 03:42 AM

I disabled the plugin system and got the same result. However, perhaps this will shed light on the issue?

Quote:

[profilefield] => Array
(
[hidden] => , '' AS field11
[required] => Array
--------------- Added [DATE]1237956307[/DATE] at [TIME]1237956307[/TIME] ---------------

Hmm actually you're right, $vbulletin->userinfo is not working correctly. I'll look into it and check back.

--------------- Added [DATE]1237957156[/DATE] at [TIME]1237957156[/TIME] ---------------

Got it, thanks for your help!


All times are GMT. The time now is 09:35 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.01111 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete