phpbb3 - Bridge between Core PHP site and PHPBB -
i want add bridge between php website , phpbb3 forum, when user login in website automatically logged-in phpbb forum or when sign-up in site automatically signed-up in forum. have seen many article not able find correct 1 can solve problem.
you can use session phpbb forum uses integration.
define('in_phpbb', true); $phpbb_root_path = (defined('phpbb_root_path')) ? phpbb_root_path : '/var/www/clients/client9/web8/web/forums/'; $phpex = substr(strrchr(__file__, '.'), 1); include_once($phpbb_root_path . 'common.' . $phpex); $user->session_begin();
from here, can use $user
object integration. example, code below show if user logged in or not.
if ($user->data['username'] == 'anonymous') { echo 'please login!'; }
this uses anonymous
user validation, phpbb adds first user account when installed.
Comments
Post a Comment