PDA

View Full Version : $vbulletin->userinfo


bleavitt
06-14-2010, 09:29 PM
I'm looking for some additional information on this variable: $vbulletin->userinfo . Specifically I'm looking for how it is being set.

In the login script (includes/functions_login.php), I find it referenced:
// make sure our user info stays as whoever we were (for example, we might be logged in via cookies already)
$original_userinfo = $vbulletin->userinfo;

But at that point it seems to be already set. Is this something that happens in the vb_registry class?

I'm trying to figure out how it gets propagated with information, and at what point that happens. For example, $vbulletin->GPC receives its varaibles after a input_clean function is run on SuperGlobals. Is it the same sort of thing for userinfo?

Thanks,
Brent

DragonBlade
06-15-2010, 01:27 AM
I dont see that line in functions_login.php but what are you trying to do exactly?

bleavitt
06-15-2010, 03:16 PM
DragonBlade,

You're right. My mistake. It's actually found in the login.php file in the root directory. Then I actually pulled it from a plulgin that modifies that file for LDAP login authentication (if you know what LDAP is, I didn't when I started this process).

I'm working on a custom login system for a proprietary solution that manages all the login process and information. My challenge is getting that system to communicate with vBulletin's login process so that it'll recognize the users without having to use vBulletin's login process.

The solution that was in place for v3.0+ seems to be obsolete for v4.0+, of which we are in the process of upgrading. I've detailed the whole issue in another thread (https://vborg.vbsupport.ru/showthread.php?t=244622), but now I've taken to just tackling it bit by bit and asking little questions as I go. I guess I'm in for the long haul on this one. :)

Thanks,
Brent

--------------- Added 1276619893 at 1276619893 ---------------

Ok, here's an even more specific question on the same topic:

In the functions_login.php (I'm sure this is the right file this time) under the "process_new_login" function. I see these two lines of code that assume that the userinfo variables have already been set elsewhere:

$lang_info = array(
'lang_locale' => $vbulletin->userinfo['lang_locale'],
'lang_charset' => $vbulletin->userinfo['lang_charset']
);

I've followed the process down to this point and cannot seem to tell where these variables would have been set. I've tried to check what the value of these properties would be, but in the process that I'm walking through, they are returning as non-existent values.

Any thoughts? It's possible that there is a hidden process or step that I inadvertently removed.

Thanks,
Brent

DragonBlade
06-15-2010, 06:00 PM
look for

function &fetch_userinfo()

in class_core.php

bleavitt
06-15-2010, 07:36 PM
Thanks DragonBlade,

That kind of helped. I'm not sure I'm making much progress though.

Here's another question that I'm not sure where to look. Where in the PHP is the conditional tag for $show['members'] being set? $show['members'] is being referenced in the header template file to show a menu for those users that are logged in.

I've found where it is unset/ or set to false when a user logs out in the 'start logout' section of login.php. Then where is it first declared 'true'?

Thanks,
Brent

--------------- Added 1276635516 at 1276635516 ---------------

Well I just found the switch for $show['member']. It is in the include/class_bootstraps.php class.