View Full Version : Get $vbulletin->userinfo without including global.php
isnichwahr
10-02-2008, 04:31 PM
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.