Topic: How does authentication in PunBB work?
I'm trying to integrate PunBB into my main site, where I have a generic PHP login script. Both login scripts already use the same members table in MySQL. Members that sign up on the main site show up in PunBB's User List (and the other way around).
But a member that's logged in at the main site is not automatically logged in at PunBB. He or she has to login seperately at the PunBB login, with the same name/pass as on the main site. So that's already pretty good.
But how can I make PunBB accept the login from my main site?
On the main site I use something like this (and variations) for restricted pages:
<?
session_start();
if($_SESSION['s_logged_n'] == 'true'){}
else {
header("Location: http://mainsite.com/login.php");
}
?>
How does authentication (/authorization?) in PunBB work? What's the general logic behind it? Which pages require authentication? Which pieces of code should I focus on? Where should I start?
I don't know php! I'm learning from examples, comparing between several scripts that do the same thing, copy pasting, trial and error. The above works on the main site, but I can't find something similar in PunBB that I can just replace to bring it into the main site.