vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   $usercache variable and getuserinfo() function (https://vborg.vbsupport.ru/showthread.php?t=58159)

Tae-Hwan 10-24-2003 11:34 PM

$usercache variable and getuserinfo() function
 
alright, my index.php is calling this query:

Code:

Query: SELECT user.*,userfield.* FROM user LEFT JOIN userfield ON userfield.userid=user.userid WHERE user.userid='1'
Time before: 0.030212998390198
Time after:  0.031402945518494

i did a little investigation, and found that it's coming from the function, getuserinfo(), which is located within admin/functions.php. the weird thing is, this function isn't called in index.php, forumdisplay.php, or showthread.php. it's called in member.php, and there's another function in functions.php that uses the $usercache variable to get the permissions of the usergroupid. my question is simply, why is it necessary to call and join the entire row of the user and userfield tables on every pageload? for the purposes of getting permissions, i kinda understand the user table, but why the userfield table? this is mostly for curiosity's sake, btw..

NTLDR 10-24-2003 11:47 PM

This looks like the query that obtains the current users information, ie $bbuserinfo, however its quite awhile since I looked at vB2's code.

Tae-Hwan 10-25-2003 02:04 AM

i'm pretty sure it's not bbuserinfo...


All times are GMT. The time now is 10:24 AM.

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.00968 seconds
  • Memory Usage 1,709KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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