Skip to:
Content

bbPress.org

Opened 14 years ago

Closed 14 years ago

#2105 closed defect (bug) (fixed)

WP_Role contains role name, instead of role slug

Reported by: scribu Owned by:
Priority: normal Milestone: 2.3
Component: API - Roles/Capabilities Version: trunk
Severity: normal Keywords:
Cc:

Description

I recently ran into some capability issues after updating bbPress to 2.2.3 (and WordPress to 3.5).

Compared with native WP roles, the bbPress role objects don't seem to have the correct value for the 'name' property.

Steps to reproduce:

var_dump( $GLOBALS['wp_roles']->get_role( 'bbp_moderator' )->name );

Expected result:

'bbp_moderator'

Actual result:

'Moderator'

Not sure if this is a bug in WP's tangled role API or if bbPress is _doing_it_wrong().

Change History (2)

#1 @johnjamesjacoby
14 years ago

  • Milestone Awaiting Review2.3

Likely bbPress is doing it wrong, and I'm translating the role somewhere.

#2 @johnjamesjacoby
14 years ago

  • Resolutionfixed
  • Status newclosed

(In [4601]) In bbp_add_forums_roles(), use $role_id instead of literal translated role name. Fixes #2105.

Note: See TracTickets for help on using tickets.