The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm creating a website that includes Vbulletin, MediaWiki and Movable Type. So I have a custom user management system kind of 'sitting on top' of these applications written in Perl...basically making subrequests to the application, parsing the cookies out of the subrequest and setting them in the user's browser session.
I have Vbulletin pretty well squared away if there is an entry in the vb_session table. I'm creating the users fine and all of the cookies are set, except when an entry in the vb_sessions table doesn't exist for the user, I'm missing the bbsessionhash cookie. This prevents the login from working. Once a user logs into Vbulletin for the first time (manually), this entry in vb_session is created for the user id, my code retrieves the session and the user is logged in. I'm trying to figure out how to create this entry. If anyone has any information on creating the user sessions or user management, I could really use some input. I'm curious as to what is happening when a user logs in and is show the 'logging in' screen. The session id seems to be updated at that point, or something else is going on...not sure. I also want to be sure I'm handling the sessions correctly and not causing unneccessary entries in the session table. Also, after reading the code for Vbulletin, the API docs and the manual, I am still lacking the understanding of how the sessionhash and idhash are calculated. Could anyone point me in a direction? Thanks! |
#2
|
|||
|
|||
![]()
I don't quite follow what you are doing. But here are some comments anyway.. <g>
It seems that the session hash is generated this way: md5(TIMENOW . SCRIPTPATH . SESSION_IDHASH . SESSION_HOST . vbrand(1, 1000000)); However, it may be simpler to retrieve it from the SQL table 'session'. |
#3
|
|||
|
|||
![]()
Thanks for the reply ElfMage.
I'm basically trying to log a user in from a custom login. The user management is written in Perl, as opposed to PHP. The issue is that sessions are not in existance in the sessions table until the user logs in for the first time. Has anyone else created a custom login for vbulletin, integrating other apps into the site? Ook, I figured this out. Vbulletin does a one-way md5 hash to create the session_hash. So I created my own session hash in perl and inserted it into the table with the remaining needed keys. My custom login is working now for the site, Vbulletin and MediaWiki. I'll probably write an article on my blog about integrating Vbulletin and MediaWiki into an existing website. |
#4
|
|||
|
|||
![]()
Very interesting. Glad you figured it out.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|