The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Generating session externally (bbsessionhash cookie and session table)
Solution now found, check a few posts below...
Ok here is my current project: I am attempting to have users on my website (www.mysite.com) login and have them also logged in on my forum (forum.mysite.com). They can share cookies as they share the domain, right? When using my login function on my website, I create the bbuserid and bbpassword cookies appropriately. This is fairly simple. Creating the session does not appear to be. As anyone using external login knows, a row in the session table must be created that has a matching sessionhash to that found in the bbsessionhash cookie. Im trying to figure out how vbulletin creates the session hash. Ive been able to create the idhash, as well as am able to fill out the userid, host, lastactivity, and useragent fields. I am guessing, since this is external login, that the location field would be set to '/'. The function fetch_sessionhash looks like such a maze... it looks liek an md5 of Time(), $_SERVER['REQUEST_URI'], idhash, user ip, and a random # from 1 to 1000000. If, in my websites controller, I send a row to the session table containing the info above, along with my bbuserid and bbpassword cookies, will vBulletin think I am logged in? Will it work if I generate the sessionhash that way from my website and then navigate to my forum? If not, how do you create the proper row in the session table in order to be "logged in" on vBulletin? I have been searching the forums all day for the answer to this, and am unable to find any useable info. Could anyone show me the minimum data to send to the vb_session table in order for external login to work? TIA :up: --------------- Added at 21:50 --------------- Oh and another question... will it work if I just place some random string in the sessionhash and also match that string in the bbsessionhash cookie? Will it find me logged in and just switch these strings once ive navigated to the forum or at least somewhere within the forum? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|