Topic: single site login trouble
Hi,
the site where my forum occurs can only by accessed by members. I don't want them then to register again in punbb. After i didn't find something like a single-site-login interface or how to for that i tried it quick an dirty by simply calling the punbb-registration-routine when a member registers to my site (whith removing the redirect headers):
# manipulate GET and POST to simulate punbb registration
$_GET['action'] = 'register';
$_POST['form_sent'] = 1;
$_POST['req_username'] = $testerData['username'];
$_POST['req_password1'] = $testerData['password1'];
$_POST['req_password2'] = $testerData['password1'];
$_POST['req_email1'] = $testerData['email'];
$_POST['register'] = 'Register'; # button
chdir ('./punbb');
require_once ('register.php');
chdir ('../');
# *** END of punbb registration ***
Fatal error: Call to a member function on a non-object in /srv/www/htdocs/betatest/punbb/include/functions.php on line 110
Line 110: $result = $db->query('SE.... do'nt have the variable $db in my own code anywhere
version 1.2.10
Idea for the reason or a better way to solve my issue as fast as possible ?
And further, why is the function set_default_user (for guests) called ?