Skip to:
Content

BuddyPress.org

Changeset 5181


Ignore:
Timestamp:
09/24/2011 02:52:23 AM (13 years ago)
Author:
boonebgorges
Message:

Ensures that bp_groups_auto_join() defaults to false; switches global check with bp_groups_auto_join() check. See #3610. Props r-a-y

Location:
branches/1.5/bp-groups
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-groups/bp-groups-loader.php

    r5052 r5181  
    216216
    217217        // Auto join group when non group member performs group activity
    218         $this->auto_join = defined( 'BP_DISABLE_AUTO_GROUP_JOIN' );
     218        $this->auto_join = defined( 'BP_DISABLE_AUTO_GROUP_JOIN' ) && BP_DISABLE_AUTO_GROUP_JOIN ? false : true;
    219219    }
    220220
  • branches/1.5/bp-groups/bp-groups-screens.php

    r5052 r5181  
    141141
    142142                // Auto join this user if they are not yet a member of this group
    143                 if ( $bp->groups->auto_join && !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
     143                if ( bp_groups_auto_join() && !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
    144144                    groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id );
    145145
     
    338338                    $error_message = __( "You have been banned from this group.", 'buddypress' );
    339339
    340                 } elseif ( $bp->groups->auto_join && !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) {
     340                } elseif ( bp_groups_auto_join() && !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) {
    341341                    // Auto join this user if they are not yet a member of this group
    342342                    groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id );
Note: See TracChangeset for help on using the changeset viewer.