One issue with using phpBB for site forums is hooking the forum up to be logged in by your main site login. phpBB 3 allows the creation of a custom authentication plugin. Create a document named “auth_name” where name is what you want the authentication method to be called. Store this in the auth/ folder and then specify in the config table in the database or the Client communication/Authentication settings section of the administration panel.
If you create a method called autologin_name within the file, it will be checked each time phpBB loads a page (you can use the login function as well if you want to check a login form which is present on each page) . By hooking up the autologin method to check your session information you can check whether the user is logged into your main site and then store these details in the user row that gets returned from the function. At a minimum, this needs to contain:
- user_id
- username
- user_password
The main issue with doing it this way is that it is still essential to store these user details in the phpbb database. The issue is this approach is fine for logging the user in, but when you need to access the forum the user details need to be pulled from the main phpBB database for display with the blog post.
The simplest solution is to check if the username/id exists in the phpbb database and if not, create the user from within the autologin function you have created. Since usernames cannot be changed usually anyway this prevents most issues (although it is a pain you need the details duplicated). Since an initial couple of users are created by phpBB there is a good chance you will not be able to duplicate the same user ids. Therefore add an arbitrary amount in phpBB so you can directly equate one record to another ( I just added 100 in phpBB to my main site ID).
For more info about the custom authentication modules check out the documentation here: