Skip to:
Content

bbPress.org

Opened 12 years ago

Closed 12 years ago

#2256 closed defect (bug) (fixed)

bbp_is_user_keymaster() seems to always return false

Reported by: imath's profile imath Owned by:
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.2.3
Component: API - Roles/Capabilities Keywords: has-patch needs-testing
Cc:

Description

Hi,

Using latest bbPress (trunk) with latest BuddyPress (trunk), i was a bit surprised as a super admin i wasn't able to post in forums of private groups or change the forum attached to one group. I've checked, and the trouble seems to be in the bbp_is_user_keymaster() function. My user_id to check upon user_can( $user_id, 'keep_gate' ) was always 0, so although my meta_key wp_capabilities was containing bbp_keymaster, i wasn't recognized as so.
Applying the diff i attach to this ticket is solving my problem.

Attachments (1)

2256.diff (574 bytes) - added by imath 12 years ago.

Download all attachments as: .zip

Change History (5)

@imath
12 years ago

#1 @alexvorn2
12 years ago

  • Milestone changed from 2.3 to Awaiting Review
  • Priority changed from high to normal
  • Severity changed from major to normal

maybe to rename $_user_id to $user_id?

#2 @alexvorn2
12 years ago

  • Keywords needs-testing added
  • Version changed from trunk to 2.2.3

#3 @johnjamesjacoby
12 years ago

  • Milestone changed from Awaiting Review to 2.3

Moving back to 2.3.

#4 @johnjamesjacoby
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4797]) Use correct $_user_id variable in user_can() check in bbp_is_user_keymaster(). Props imath. Fixes #2256.

Note: See TracTickets for help on using tickets.