You can use the session that the PHPBB forum uses for this 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, you can use the $user
object for your integration. For example, the code below will show you if your user is logged in or not.
if ($user->data['username'] == 'Anonymous')
{
echo 'Please login!';
}
This uses the Anonymous
user for validation, which PHPBB adds as the first user account when it is installed.