Fix lost admin access in bbPress

September 1st, 2009 | Tagged as: ¤ | Download as PDF
bbPress expert hire me notice

If you can’t see the admin link anymore and any attempt to access /bb-admin/ takes you back to the forum front page then it implies that you have lost the capabilities of an administrator with your user. Earlier it happened with users trying to integrate bbPress 0.9 with WordPress 2.7 or 2.8 but documenting it so that some day it might help anyone is a good idea.

Fix via phpmyadmin

bbpress capabilities
Open the usermeta table of your installation. Its either bb_usermeta or wp_usermeta (if you have integrated installs) if you haven’t changed the default table prefix.

Make sure the value of bb_capabilities for your user (user id) is

a:1:{s:9:"keymaster";b:1;}

Fix via mysql

If you are tying this method, then you probably are geeky enough to know what to fix but still here is how it is done.

UPDATE `bbpress`.`bb_usermeta` SET `meta_value` = 'a:1:{s:9:"keymaster";b:1;}' WHERE `bb_usermeta`.`user_id` =1 ;

where bbpress is your database name, bb_usermeta is your table name. You need to change user_id as per your case (1 or 2 or x).

Refresh your browser and now you should have the admin link and access to admin panel back. Let me know if you need any kind of help.

 
{ 9 Comments }
  1. Gustavs says:

    Hello.

    I’m having the same problem, but this fix didn’t work for me.
    In fact, now it doesn’t even show up the Admin button anymore.

    I have WP 2.8 and BB 1.0 and I integrated the WP user database with BB too.

    Any ideas?

  2. Ashfame says:

    @Gustavs
    If you can’t see the Admin link then it means that the capabilities of user are not that of keymaster.
    Are you sure that you tried the above method? If did, confirm that you have made the change.

  3. Gustavs says:

    I did.

    I found that the only way to get it working was to set it up with out integrating wp user database and setting it up later from bbPress administrator panel. I’m not sure why this worked and integrating from the beginning didn’t but at least it did.

  4. Ashfame says:

    @Gustavs
    If correct capabilities are set then by no means the user can miss the admin link.
    Do you see the correct capabilities for your user?

  5. Just one thing: it first failed as I copy/paste text from you blog, some quotes (surrounding keymaster) were uncorrect.
    From you blog, I got: a:1:{s:9:”keymaster”;b:1;}
    And I had to use: a:1:{s:9:”keymaster”;b:1;}
    Don’t know if the difference is really visible on this page.

  6. Courtney says:

    Thank you for documenting all of this. I have installed both WP and bbpress and run the integration — and when I go to the bbpress page, I can’t get to settings or to the bp-admin area.

    However, when I went into my wp_usermeta table, I saw just what you said:

    bb_capabilities a:1:{s:9:”keymaster”;b:1;}

    Could something else be off? Do you have any ideas?

    Thanks in advance.

  7. Ashfame says:

    @Courtney
    Does the Admin link show up? If it does, then trying flushing your cookies. Alternatively you can try a different browser, that would work fine.

  8. Courtney says:

    I think maybe that was it — I’m on a different computer now and I can get in!

    • Ashfame says:

      @Courtney
      Let me know if you face any other issues

Leave a Reply

(required)

(required)