i think i'll post here because i see many of you have problems with logging.. i haven't found any clear answer about integrating log-on, so did it my way a few minutes ago.. it's a way to intergate a complete separate log-on..

f.ex. my login class sets some session data, no cookies... punbb sets cookies, no session.. completely different. and that's how you do it:
wherever your logins are, must be the same, and the passwords to, but you know that i hope, (f.ex. i have other table with logins and passwords and other user data, but the username and md5(pass) must be the same... uploaded them to punbb tables)

4 situations you must predict and solve the problem


1. user is logging from your site

in your login class, function, script, whatever, put after your operations this:

include("./forum/config.php");
include("./forum/include/functions.php");
setcookie($cookie_name, serialize(array($your_sent_login, pun_hash($your_sent_pass))), $expire, $cookie_path, $cookie_domain, $cookie_secure);

of course the forum directory path may be other in your case.
it sets the coookie for the forum.. as you can see, now when you logon on your site, the cookie is set and you're logged on the forum..


2. if the user logs on by forum

on the top of /includes/common.php put session_start();

in /login.php, find the lines below and put code before:

/ * your site login code in here, session data saving, maybe database update, etc... of course put it in a working way, don't blame the forum :) if it's included ok - it must work */
setcookie($cookie_name, serialize(array($db_username, $form_password_hash)), $expire, $cookie_path, $cookie_domain, $cookie_secure);
redirect($_POST['redirect_url'], $lang_login['Login redirect']);


3. user loggs out from your site

in your private  logging out code put this:

include("./forum/config.php");
include("./forum/include/functions.php");
setcookie($cookie_name, serialize(array('Guest', 'Guest')), time() + 31536000, $cookie_path, $cookie_domain, $cookie_secure);


4. user logging out from the forum

find these lines and put your logging out code

setcookie($cookie_name, serialize(array('Guest', 'Guest')), time() + 31536000, $cookie_path, $cookie_domain, $cookie_secure);
/* here your private logging out code */
redirect('index.php', $lang_login['Logout redirect'])



that's all folks, somebody has any other (maybe easier) ways?