bbPress Broken Roles

When I discovered that the admin user account on one of my WordPress sites had not access to post in the bbPress forum associated with that site I did a search for how to fix it. There were quite a few sites that had published an answer so presumably this is a fairly commn problem for those using a bbPress forum as part of a WordPress site. Unfortunately all of the sites I found at first all gave the same answer and the answer they gave assumed that you had not integrated bbPress properly into WordPress and that you required that everyone sign up separately for a WordPress account and a Bpress account. While all mentioned checking the WordPress user table for where you have them integrated, presumably none of them had actually tested that situation as their solution repairs the bbPress login by breaking the WordPress one. Also all of the solutions assumed that you have your system set up using the default table names - something you should never do if you want your system to be secure.

I did eventually locate the correct solution to the problem and while all of the incorrect ones gave instructions on how to "fix" it by directly updating the database, the correct solution turned out to be an option built into bbPress itself. Since all of the easily found pages regarding this give a solution that only works sometimes and which requires that you manually update the database, I thought it worthwhile to help to promote the proper solution to the problem here.

To properly fix user access problems in bbPress you need to first log in to the admin area of your WordPress where the bbPress plugin is installed. Next select the Tools option from the admin menu and then select Forums. The bbPress plugin comes with a large range of tools to make administering your forum easier that can be found in this area. The option you need in this instance is on the Repair Forums tab and is in fact the last checkbox in the list - "Remap existing users to default forum roles". Simply check that option and press the "Repair Items" button and any WordPress user accounts that do not currently have a bbPress role will be assigned the bbPress role corresponding to the WordPress role. In the case of a "WordPress "administrator" account the corresponding bbPress "keymaster" role will be assigned giving you back full access to all the options within bbPress the same as you have for WordPress.

So how can this get broken when bbPress sets up the access correctly when you first install it? Well the most likely cause is that another plugin that you have installed since bbPress has updated settings relating to user access without taking the presence of bbPress into account. For example if you install the "Better WP Security" plugin (which I recommend you use with all WordPress installs to provide many security measures without you needing to manually apply anything) then one of the options it suggests is to set up a new admin user and to delete the one that WordPress creates by default. This means that your admin user has a different name from what would normally be expected and it doesn't have an id of 1 in the database. This process does not know about the existance of bbPress and so the access role that is assigned on the new admin user is only the one required for admin access in WordPress and the corresponding bbPress role is lost.

go to top

FaceBook Follow
Twitter Follow
Donate