Example #1
0
function is_not_joined_in_group($group_id)
{
    require_once WP_PLUGIN_DIR . '/pr-membership/models/group-model.php';
    $model = new Group_Model();
    $user_id = get_current_user_id();
    $result = $model->check_group_joins($group_id, $user_id);
    if ($result) {
        return true;
    } else {
        return false;
    }
}