[Bb-trac] Re: [bbPress] #1016: Users registered through WordPress get inactive role in bbPress

bbPress bb-trac at lists.bbpress.org
Mon Dec 22 11:42:35 GMT 2008


#1016: Users registered through WordPress get inactive role in bbPress
---------------------------------------+------------------------------------
 Reporter:  greenshady                 |        Owner:                    
     Type:  defect                     |       Status:  new               
 Priority:  high                       |    Milestone:  1.0-beta & XML-RPC
Component:  integration                |      Version:  1.0-beta (trunk)  
 Severity:  critical                   |   Resolution:                    
 Keywords:  Registration, Integration  |  
---------------------------------------+------------------------------------
Comment (by svennid):

 I've created a plugin to make a quickfix for this problem. It
 automatically sets all users without capabilities to members.

 {{{
 function inactive_to_member() {
         $userID = bb_get_current_user_info( 'id' );
         $user_obj = new BP_User( $userID );
         $user = bb_get_user( bb_get_user_id( $userID ) );
         if(empty($user->capabilities)) {
                 $user_obj->set_role('member');
         }
 }
 add_action ('bb_head', 'inactive_to_member', 5, 0);
 }}}

 However, it does not follow the settings in the admin menu for WP
 integration. It just makes a workaround which might do the trick for a
 while.

 [http://svenni.dragly.com/downloads/bbpress/plugins/inactivetomember.zip
 Plugin download] (same as the code above).

-- 
Ticket URL: <http://trac.bbpress.org/ticket/1016#comment:3>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list