Jump to content

Cookie different to database?


Mutley

Recommended Posts

I'm trying to make a simple script where if you are logged in on the Vbulletin forum, you can view pages on the website (seperate to the forum).

 

I matched the ID cookie with the one in the database but when I tried the Password cookie, it's completely different to the one in the database.

 

I'm sure the database stores it in MD5 but no idea about the cookie? Any ideas?

Link to comment
Share on other sites

If you are using the forum as the main application for authentication then:

 

1- print_r($_SESSION) variables to see what varibles you forum is storing after authentication

2- Once you find these variables you can check these variables in an include file that you can call on the rest of the pages of your site.

3- suppose if the forum is using varibles $_SESSION['is_authenticated'] for authentication then you can use this variable on other pages as well.

 

This will make sure that if your user is logged in into the forum then he can also access other pages of your website as well.

Link to comment
Share on other sites

Where are you placing this code?

 

You have to place in one of the files of your forum which is displayed after user has been authenticated like may be some welcome page or so.

 

And if it still displays array() then the forum is not saving anything in the session, which i doubt to be the case.

Link to comment
Share on other sites

I looked in the login.php and not sure what I'm looking for, this seems close though, maybe it makes more sense to you:

 

if (!verify_authentication($vbulletin->GPC['vb_login_username'], $vbulletin->GPC['vb_login_password'], $vbulletin->GPC['vb_login_md5password'], $vbulletin->GPC['vb_login_md5password_utf'], $vbulletin->GPC['cookieuser'], true))

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.