Topic: Log-in implementation

Hello reader,

i'm currently working on a website for my guild. It looks really sweet and is working pretty properly aswell, i editted the punbb forum to my style etc.

However, i want to add login functionality to all my pages. I have a widget that has member functionality in it, such as uploading screenshots and other private information. To achieve this i want to link this login-div to the punbb forum/user accounts.

I figured out that i had to add

define('FORUM_ROOT', './forum/');
require FORUM_ROOT.'include/common.php';

to my pages in order to achieve that. But i can't figure out where i can find the user informations. I saw that it was stored in an array in 1.2, but i can't figure out how it works now.

could anyone help me out?

I just want a simple login/logoff function on a random page, the define/require works properly. Also this includes having the check if the user is allready logged in.

thanks in advance.

(When it's done i can link the webpage wink don't want to spoil )

Re: Log-in implementation

After including the "include/common.php" file, $forum_user variable will be available in code. It is store all information about user.

Re: Log-in implementation

thanks for the answer, i got a bit further yesterday. I can login from external pages and that works perfectly. The only thing i'm missing now is the check whether an user is allready logged on when he's on another page, so i can add more user functionality there. Is this easily done with an isset()? Or is it more complex?

Re: Log-in implementation

Could you describe in more detail what exactly you want to add, please?