user_can() not working as expected for specific role
-
Hi there,
I spend a lot of time supporting BuddyPress and I’ve been investigating an issue in relation to a bp capability ‘bp_moderate’ This gives users the ability to moderate a bp site. However I’ve come across an issue where user_can() does not seem to be working correctly.
$contributor = get_role( 'contributor' ); $contributor->add_cap( 'bp_moderate');
IF I fetch the userdata for one of my contributors, I can see that included in the capabilities array is bp_moderate and this is set to true.
However, user_can($user_id, ‘bp_moderate’) for the same user returns false.
So it seems for that capability, something odd is happening. How could that be?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘user_can() not working as expected for specific role’ is closed to new replies.