The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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 ? |
#2
|
|||
|
|||
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. |
#3
|
||||
|
||||
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'.
|
#4
|
|||
|
|||
vb does set cookies for nonpersistent login, just not bbuserid and bbpassword (yes bb is default prefix.... configurable of course)
|
#5
|
|||
|
|||
Quote:
Thanks, CK |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|