bp_group_is_member_allowed_posting( object|bool $group = false )

Check if current user is allowed to post in a group.

Description

Parameters

$group

(Optional) Group to check is_member. Default: current group in the loop.

Default value: false

Return

(bool) true if the user is allowed, otherwise false.

Source

File: bp-groups/bp-groups-template.php

3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
function bp_group_is_member_allowed_posting( $group = false ) {
    global $groups_template;
 
    if ( ! is_user_logged_in() ) {
        return false;
    }
 
    if ( empty( $group ) ) {
        $group =& $groups_template->group;
    }
 
    return groups_is_user_allowed_posting( bp_loggedin_user_id(), $group->id );
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.