1 (edited by peps 2005-11-17 14:04)

Topic: How to set punbb cookies/sessions?

Hello. Im trying to integrate my own loginpage with punbb. I have organised my own loginsystem so both punbb and my system have the same usernames and passwords.

Does anyone know how to set the cookies/sessions for punbb?

I found an example on this forum but it didnt work for me.

include("forum/config.php");
include("forum/include/functions.php");
$sent_password = $_POST['passwd'];
$sent_login = $_POST['user'];

setcookie($cookie_name, serialize(array($sent_login, pun_hash($sent_password))), $expire, $cookie_path, $cookie_domain, $cookie_secure);

/Erik

2

Re: How to set punbb cookies/sessions?

The problem is solved. I found another thread about how to set cookies.

setcookie($cookie_name, serialize(array($userid, md5($cookie_seed.$password_hash))), $expire, $cookie_path, $cookie_domain, $cookie_secure);

/peps