Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Status

@danbp

Participant

Hi,

the function name contains current_user. So it seems you have to check the capability of the current_user, one cap by one, and not for all his capabilities.

Try if( bp_current_user_can( 'editor' ) || ( bp_current_user_can( 'author') || and so on...) )
or better bp_current_user_can( 'bp_moderate' ).

More details about bp_current_user_can are given by @jjj(BP project lead) in this topic.

To clarify the situation, in the first topic you mention “administrator” and “editor”, which are WP roles.

In the second topic you speak about profile types. Sorry for this question, but do you mean you’ve created new WP roles or did you created some member types ?
This is ambigous. Give details please.

It’s important to know because WP roles and member_types are absolutely not the same thing as they don’t work identical.

Default WP role of a BuddyPress member is “subscriber”.
If you create a member type Teacher and asign it to a user, you then have a subscriber with a member type of Teacher.

At this stage, you can eventually sort your members by type, but they don’t have any additionnal capability outside those allowed for “subscriber”.

In the same way, you can have users with “author” or “editor” (wp) role and give them a Teacher member type.

In this case, you have subscribers, authors and editors listed/appearing/or whatever inside BP as Teacher, and for each role, what they can do inside WP.

Skip to toolbar