Skip to:
Content
Pages
Categories
Search
Top
Bottom

Ive deleted a user with the keymaster statut


  • gathero
    Participant

    @gathero

    Hello, ive deleted an admin user with the Keymaster statut on BBpress (Version 2.6.5).
    Unfortunately, i cant attribute the “keymaster” to another admin user.
    I cant manage the forum section in WP.

    How can i fix this ?

    Thx.

    Seb.

Viewing 15 replies - 1 through 15 (of 15 total)

  • Robin W
    Moderator

    @robin-w

    I’m not sure why you can attribute keymaster to another admin – are you not an admin also? or what is preventing you?


    gathero
    Participant

    @gathero

    Im an admin, but “keymaster” is no longer available in the roles I can assign.


    Robin W
    Moderator

    @robin-w

    are you looking at WordPress roles or bbpress roles?


    gathero
    Participant

    @gathero

    In the WP User menu, i can modify the forum roles, but there no “Keymaster” role.


    Robin W
    Moderator

    @robin-w

    hmmm… not sure what to suggest -you must have code that is stopping that role.

    what other plugins are you running?


    gathero
    Participant

    @gathero

    Ive tried to desinstall-reinstall Bbpress, but the problem the problem persists.
    I also use Buddypress and a lots of plugins. There was no problems before i deleted that user with the Keymaster role.


    Robin W
    Moderator

    @robin-w

    that may be true, but it was probably not deleting that user that is behind the problem.

    WordPress and bbpress roles are stored in the options table in the database under wp_user_roles.

    Something (possibly a roles plugin?) has deleted or changed this role.

    If you go into the database and copy what is on there, I may be able to help.


    Robin W
    Moderator

    @robin-w

    can you just tell me if this is a fresh install of 2.6.5, or whether you have upgraded from 2.6.4 recently?


    Robin W
    Moderator

    @robin-w

    Just had a chance to dig further into this – bbpress will only let a keymaster set another keymaster, so if you’re not a keymaster yourself then by default you can’t do this.

    However this code should allow any admin to set a keymaster

    add_filter( 'bbp_is_user_keymaster', 'rew_allow_keymaster', 10 , 3 );
    
    function rew_allow_keymaster ($retval, $_user_id, $user_id) {
    	if (current_user_can( 'manage_options' )) $retval = true ;
    return $retval ;
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    BUT THEN TAKE IT OUT AFTER you have set up another – as it makes all admins in effect keymasters.


    gathero
    Participant

    @gathero

    Hello, so now “Keymaster” is back in the dropdown list but if modify the bbpress role to it nothing happens (Administrator is set). Same thing if i create a new user selecting “Keymaster” role, Administrator is set.


    gathero
    Participant

    @gathero

    Its what ive found in my wor2975_usermeta table for my admin user.

    212 5 wor2975_capabilities a:2:{s:13:"administrator";b:1;s:13:"bbp_moderator";b:1;}
    
    213 5 wor2975_user_level 10

    Robin W
    Moderator

    @robin-w

    there must be a second check I missed – you could just change that entry to

    a:2:{s:13:”administrator”;b:1;s:13:”bbp_keymaster”;b:1;}

    that would do it


    gathero
    Participant

    @gathero

    Perfect! thx


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Hey @gathero,

    Sorry for this inconvenience. You definitely discovered a situation that the bbPress team has not really considered. It should not be possible to delete the last remaining Keymaster, just like you cannot delete the last remaining Administrator.

    I’ll make sure this gets addressed in a future release of bbPress.


    Robin W
    Moderator

    @robin-w

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.
Skip to toolbar