vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Get $vbulletin->userinfo without including global.php (https://vborg.vbsupport.ru/showthread.php?t=192509)

isnichwahr 10-02-2008 04:31 PM

Get $vbulletin->userinfo without including global.php
 
hi,

i want to use the logininformations like username and user_id on another page, but i dont want to include global.php there to save performance, is this possible?

Does anyone have a workaround to get the userinfo?

Thank you, Yours David

Dismounted 10-03-2008 01:44 AM

See how vBulletin gets the info in fetch_userinfo(). By the way, you would still need to verify the user is logged in first though...

nexialys 10-03-2008 03:01 AM

there is no workaround.

the information you require is part of the "session" that is called directly from the API of vBulletin, and the actual structure require that the whole set of classes contained in global.php, init.php and functions.php is called.

you could rewrite part of it and make a minimal class call, but it would require a lot of manipulations of the actual classes.

btw, hello David!

mamulea 12-01-2010 07:57 AM

I know this is an old thread, but I'm having a similar problem. My vbulletin forum is installed on domain.com/forum but I wish to extend the session over the entire website. I extended it on the main domain (domain.com) by using a global $vbulletin and everything works fine. However, I have a number of sub directories with mini sites , each of them a wordpress install and I can't make it work the session sharing. I also use the global $vbulletin on domain.com/site1 or domain.com/site2 and I cannot see the user when logged in. Any idea how I can do it without requiering global.php? Is is a cookie matter? 10x.

mamulea 12-02-2010 08:13 AM

Resolved. I included global.php as first line in my code and everything works fine.


All times are GMT. The time now is 08:49 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.00888 seconds
  • Memory Usage 1,708KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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