Support » Plugin: Confirm User Registration » Improve plugin to work with bbpress

  • Robin W

    (@robin-w) Moderator

    This is a great plugin, and combined with ‘SB welcome letter editor plugin’ gives a great registration solution.

    However I’m using bbpress forum software and that has an extra set of roles that are forum specific. The way that bbpress sets up the bbpress role for authomatic registration is that it adds the bbpress role on the first login of the user – I haven’t figured out it does that yet !

    The CUR plugin somehow interferes with that (not sure how) so that on approval the bbpress role is lost.

    I found that adding a couple of lines to your auth function adds the participant role, but loses the subscriber role !

    public function auth_users( array $user_ids )
    		if ( $user_ids && current_user_can( 'promote_users' ) ) :
    			foreach ( $user_ids as $user_id ) :
    				if ( is_numeric( $user_id ) ) :
    					update_user_meta( $user_id, 'authentication', '1' );
    					$array = array('subscriber', 'bbp_participant');
    					update_user_meta( $user_id, 'wp_capabilities', $array);
    					do_action( 'confirm-user-registration-auth-user', $user_id );
    					$this->send_notification( $user_id );

    in the user meta table wp_capabilities for a wordpress subscriber and bbpress participant looks like


    Any idea how I make that with the code above?

  • The topic ‘Improve plugin to work with bbpress’ is closed to new replies.