mraiur Posted December 26, 2007 Share Posted December 26, 2007 Hi. I am trying to make a site whit the phpBB v2 forum and i have a login form but i need to make a connection whit that login form and the login in the phpbb forum so you dont have to login in two places . But i cant find how ? Can somebody help me whit that ? THX all . And Merry Xmas and happy new Year. Quote Link to comment https://forums.phpfreaks.com/topic/83271-solved-phpbb-forum-modify/ Share on other sites More sharing options...
interpim Posted December 26, 2007 Share Posted December 26, 2007 look at your login page for phpbb and determine what it is setting, (i believe phpbb uses sessions) and basically set the same session as logged in for phpbb Quote Link to comment https://forums.phpfreaks.com/topic/83271-solved-phpbb-forum-modify/#findComment-423601 Share on other sites More sharing options...
mraiur Posted December 26, 2007 Author Share Posted December 26, 2007 Yes i tried... But it uses Cookies and sessions ... cookies are set in the moment you enter the forum. One of them is a generated SID and that is one of the hardest to find and the other thing is that i cant find how the forum contains the user data ...in the session or the cookie that is . Quote Link to comment https://forums.phpfreaks.com/topic/83271-solved-phpbb-forum-modify/#findComment-423629 Share on other sites More sharing options...
revraz Posted December 26, 2007 Share Posted December 26, 2007 You can probably find answers in the 3rd party script forum. Quote Link to comment https://forums.phpfreaks.com/topic/83271-solved-phpbb-forum-modify/#findComment-423634 Share on other sites More sharing options...
interpim Posted December 26, 2007 Share Posted December 26, 2007 <?php $phpbb_root_path = './forums/'; define('IN_PHPBB', true); // // phpBB related files // include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/bbcode.' . $phpEx); // // start session management // $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); if($userdata['session_logged_in']) { $db = mysql_connect(DB_SERVER, DB_USER, DB_PASS); mysql_select_db(DB_NAME,$db); $session->startSession(); $session->userinfo = $database->getUserInfo($userdata['username']); $session->logged_in = 1; $session->username = $_SESSION['username'] = $userdata['username']; $session->userid = $_SESSION['userid'] = $session->userinfo['userid']; $session->userlevel = $session->userinfo['userlevel']; $session->sessionid = $userdata['session_id']; $session->time = $userdata['session_start']; $database->updateUserField($session->username, "userid", $session->userid); $database->addActiveUser($session->username, $session->time); $database->removeActiveGuest($_SERVER['REMOTE_ADDR']); } $db = mysql_connect(DB_SERVER, DB_USER, DB_PASS); mysql_select_db(DB_NAME,$db); ?> Quote Link to comment https://forums.phpfreaks.com/topic/83271-solved-phpbb-forum-modify/#findComment-423637 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.