Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/11/2010 11:25:11 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2540 props boonebgorges

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-groups.php

    r3175 r3178  
    9797    $bp->groups->valid_status = apply_filters( 'groups_valid_status', array( 'public', 'private', 'hidden' ) );
    9898
     99    // Auto join group when non group member performs group activity
     100    $bp->groups->auto_join = defined( 'BP_DISABLE_AUTO_GROUP_JOIN' ) ? false : true;
     101
    99102    do_action( 'groups_setup_globals' );
    100103}
     
    365368
    366369                /* Auto join this user if they are not yet a member of this group */
    367                 if ( !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
     370                if ( $bp->groups->auto_join && !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
    368371                    groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id );
    369372
     
    543546
    544547                /* Auto join this user if they are not yet a member of this group */
    545                 if ( !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
     548                if ( $bp->groups->auto_join && !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
    546549                    groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id );
    547550
Note: See TracChangeset for help on using the changeset viewer.