Log in

View Full Version : Logout Session Hash


Staircase
07-03-2007, 01:33 AM
I want a link on my main site to log out of the forums if you're already logged in, but there's this session hash which I have no idea how to get.

Like: login.php?do=logout&logouthash=[something]

Can anyone help me? Thanks!

Adrian Schneider
07-03-2007, 01:38 AM
Taken from navbar<a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a>

Logikos
07-03-2007, 01:38 AM
This is the variable used: $bbuserinfo[logouthash]

Staircase
07-03-2007, 02:59 AM
Thanks, but how do I get the variable to work? :l I'm linking to log out from my main site which has no connection to the forum except it tells you if you are logged in or not.

Logikos
07-03-2007, 03:09 AM
How are you able to tell if the user is logged in or not? Do you know which code in the script is determining this?

Staircase
07-03-2007, 04:40 AM
I use the cookies set in their browser to tell if they are logged in. But I couldn't find "logouthash" in any of the MySQL tables so I have no idea how they get it...

Thanks for your help! :)

Adrian Schneider
07-03-2007, 05:06 AM
From functions.php / fetch_userinfo // set the logout hash
$user['logouthash'] = md5($user['userid'] . $user['salt'] . COOKIE_SALT);

Staircase
07-04-2007, 12:53 AM
Ooh thanks a ton! :)

heyo
07-15-2007, 06:49 AM
From functions.php / fetch_userinfo // set the logout hash
$user['logouthash'] = md5($user['userid'] . $user['salt'] . COOKIE_SALT);

what is cookie_salt? where is that?

**cookie_salt is your license