vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Vbulletin Cookies ? (https://vborg.vbsupport.ru/showthread.php?t=101198)

cinq 11-20-2005 05:57 AM

Vbulletin Cookies ?
 
Ok am trying to check if user is logged into the forums, from outside the forum directory.

Short of the 'traditional chdir/include global.php' route, is there another route I can take?

How about checking for cookies set by vB?
$_COOKIE['bbuserid'] perhaps and if so how do I read it?

any help ? :D

monotreme 11-23-2005 07:34 PM

I have my vb set up as a subdirectory. program files in the same domain can get the vb cookies in this setup. assuming that you don't have them set to something odd. In vb I have them just covering the whole domain and the cookie path is the default /

If the user has a persistent login, then the bbuserid and bbpassword cookies exist and my outside script can get them.

a simple print_r($_COOKIE) will confirm this for you. I don't understand your questin
"how do I read it?" What you said: $_COOKIE['bbuserid'] -- that is how you access it, if it exists.

If the user is logged into vb but not a "rememberme" there are no external login cookies available.

So I'm supposeing that vbulletin is maintianing session only login in it's database. To get that your script would have to open a connection to the vb db and read the session table.

Paul M 11-23-2005 09:10 PM

it depends on how you have your cookie domain set in vb - if you have it tied down to the forum folder level then you cannot read that cookie out of the forum. If you have it at domain level then you should be okay. Also, it's only bbuserid if your cookie prefix is set to 'bb'. :)

monotreme 11-28-2005 06:20 PM

vb does set cookies for nonpersistent login, just not bbuserid and bbpassword (yes bb is default prefix.... configurable of course)

ConKien 12-28-2005 05:17 AM

Quote:

Originally Posted by monotreme
vb does set cookies for nonpersistent login, just not bbuserid and bbpassword (yes bb is default prefix.... configurable of course)

can you tell me what are they. I tried to view my account cookies but could not find bbuserid or bbpassword as you said.

Thanks,
CK


All times are GMT. The time now is 04:48 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.00986 seconds
  • Memory Usage 1,717KB
  • 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_quote_printable
  • (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