Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/22/2012 09:10:51 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Introduce functions for getting and caching the current users current group status. Use these new functions in the Group Forum extension, to remove dependency on $groups_template global. Fixes bugs where regular users could not create content in private/hidden groups. Hat-tip boonebgorges. Fixes #2119.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/extend/buddypress/group.php

    r4613 r4633  
    192192            case 'read_hidden_forums'  :
    193193            case 'read_private_forums' :
    194                 if ( bp_group_is_member() || bp_group_is_mod() || bp_group_is_admin() ) {
     194                if ( bbp_group_is_member() || bbp_group_is_mod() || bbp_group_is_admin() ) {
    195195                    $caps = array( 'participate' );
    196196                }
     
    204204            case 'edit_others_replies' :
    205205            case 'edit_others_topics'  :
    206                 if ( bp_group_is_mod() || bp_group_is_admin() ) {
     206                if ( bbp_group_is_mod() || bbp_group_is_admin() ) {
    207207                    $caps = array( 'participate' );
    208208                }
     
    212212            case 'delete_topic' :
    213213            case 'delete_reply' :
    214                 if ( bp_group_is_admin() ) {
     214                if ( bbp_group_is_admin() ) {
    215215                    $caps = array( 'participate' );
    216216                }
     
    979979
    980980        // Non-members cannot see forms
    981         if ( ! bp_group_is_member() ) {
     981        if ( ! bbp_group_is_member() ) {
    982982            $retval = false;
    983983
    984984        // Banned users cannot see forms
    985         } elseif ( bp_group_is_user_banned() ) {
     985        } elseif ( bbp_group_is_user_banned() ) {
    986986            $retval = false;
    987987        }
Note: See TracChangeset for help on using the changeset viewer.