I am trying to integrate login and registration service of CMSMS with PHPBB3.
Currently I am working on the login system. I have an external script that logges user into the forum. It worked when I call it.
However, when I add the login script inside the do_login action inside the FEU users module.
I receive the following error message from the PHPBB engine: Fatal error: Cannot redeclare class template in /var/www/html/forum/includes/template.php on line 24
The integration source code:
Code: Select all
//CMS code
// we're logged in
//Custom code
error_reporting(E_ALL ^ E_NOTICE);
$username ="test_acc";
$password = "test_pass";
$remember = "0";
define('IN_PHPBB', true);
define('ROOT_PATH', "/var/www/html/forum");
if (!defined('IN_PHPBB') || !defined('ROOT_PATH')) {
exit();
}
$phpEx = "php";
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . '/';
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$auth->login($username, $password, $remember, 1, 0);
//Custom code ends here
// store a cookie ?CMS code
Akonkagva