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
https://forums.phpfreaks.com/topic/41757-cookie-different-to-database/
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.

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.

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))

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.