vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   $vbulletin->userinfo['userid'] always returns 0 (https://vborg.vbsupport.ru/showthread.php?t=265887)

HMBeaty 06-28-2011 12:43 PM

Quote:

Originally Posted by socialteenz (Post 2214042)
Did you try?

{vb:raw userinfo.fieldx}

What does that have to do with anything? :confused:

BirdOPrey5 06-28-2011 12:44 PM

Quote:

Originally Posted by socialteenz (Post 2214042)
Did you try?

{vb:raw userinfo.fieldx}

That code only works in a template. This is raw php code.

$vbulletin->userinfo['userid'] is the correct variable to use... why it's not working is the issue... probably a cookie thing, the user is being logged out/has no session on the custom page.

Did you declare $vulletin to be global?

HMBeaty 06-28-2011 12:48 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2214046)
That code only works in a template. This is raw php code.

$vbulletin->userinfo['userid'] is the correct variable to use... why it's not working is the issue... probably a cookie thing, the user is being logged out/has no session on the custom page.

Did you declare $vulletin to be global?

And the code posted by socialteenz
HTML Code:

{vb:raw userinfo.fieldx}
pulls the info from a user profile field for a template lol

kh99 06-28-2011 12:57 PM

In case anyone cares, the OP solved the problem 10 posts ago, it was the cookie path (and there was nothing wrong with the original code) :)

HMBeaty 06-28-2011 12:59 PM

Quote:

Originally Posted by kh99 (Post 2214055)
In case anyone cares, the OP solved the problem 10 posts ago, it was the cookie path (and there was nothing wrong with the original code) :)

https://vborg.vbsupport.ru/external/2011/06/9.jpg

socialteenz 06-28-2011 01:01 PM

Quote:

Originally Posted by HMBeaty (Post 2214050)
And the code posted by socialteenz
HTML Code:

{vb:raw userinfo.fieldx}
pulls the info from a user profile field for a template lol

My bad, it was supposed to be

Code:

{vb:raw userinfo.userid}

HMBeaty 06-28-2011 01:02 PM

Quote:

Originally Posted by socialteenz (Post 2214058)
My bad, it was supposed to be

Ah, that makes a little more sense, but still for a template :D

socialteenz 06-28-2011 01:10 PM

Quote:

Originally Posted by HMBeaty (Post 2214060)
Ah, that makes a little more sense, but still for a template :D

yeah, i didn't read the thread properly though.


All times are GMT. The time now is 01:04 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.01207 seconds
  • Memory Usage 1,737KB
  • 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_code_printable
  • (2)bbcode_html_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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