Thanks alot. Works fine!
1 2005-11-17 19:43
Re: Integrating with classes (2 replies, posted in PunBB 1.2 modifications, plugins and integrations)
2 2005-11-17 19:04
Topic: Integrating with classes (2 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I am trying to integrate the login system, but the $pun_user array is always empty when I try to access it from a class. Do you know what I can do?
Thanks
The code below prints out only "hello world".
<?
define('PUN_ROOT', './forum/');
require PUN_ROOT.'include/common.php';
//Makes normal pages work if forum is en maintenance mode
define('PUN_TURN_OFF_MAINT', 1);
class test{
function __construct() {
echo pun_htmlspecialchars($pun_user['username']);
print_r($pun_user);
echo "hello world";
}
}
?>