Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2010, 09:29 PM
bleavitt bleavitt is offline
 
Join Date: Jun 2010
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default $vbulletin->userinfo

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:
PHP Code:
    // 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
Reply With Quote
  #2  
Old 06-15-2010, 01:27 AM
DragonBlade's Avatar
DragonBlade DragonBlade is offline
 
Join Date: May 2006
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont see that line in functions_login.php but what are you trying to do exactly?
Reply With Quote
  #3  
Old 06-15-2010, 03:16 PM
bleavitt bleavitt is offline
 
Join Date: Jun 2010
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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, 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 [DATE]1276619893[/DATE] at [TIME]1276619893[/TIME] ---------------

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:

PHP Code:
$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
Reply With Quote
  #4  
Old 06-15-2010, 06:00 PM
DragonBlade's Avatar
DragonBlade DragonBlade is offline
 
Join Date: May 2006
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

look for
PHP Code:
function &fetch_userinfo() 
in class_core.php
Reply With Quote
  #5  
Old 06-15-2010, 07:36 PM
bleavitt bleavitt is offline
 
Join Date: Jun 2010
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 [DATE]1276635516[/DATE] at [TIME]1276635516[/TIME] ---------------

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:33 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.03907 seconds
  • Memory Usage 2,205KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete