Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/13/2011 09:54:52 PM (14 years ago)
Author:
boonebgorges
Message:

Introduces bp_do_404() for easy 404ing. Corrects invalid path handling throughout, using bp_do_404(). Fixes #3280. Props DJPaul

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-loader.php

    r4378 r4506  
    156156        ) );
    157157
     158        // If the user was attempting to access a group, but no group by that name was
     159        // found, 404
     160        if ( empty( $this->current_group ) && !empty( $bp->current_action ) && !in_array( $bp->current_action, $this->forbidden_names ) ) {
     161            bp_do_404();
     162            return;
     163        }
     164       
     165        // Group access control
     166        if ( !empty( $this->current_group ) && !$this->current_group->user_has_access ) {
     167            bp_core_no_access();
     168        }
     169
    158170        // Preconfigured group creation steps
    159171        $this->group_creation_steps = apply_filters( 'groups_create_group_steps', array(
Note: See TracChangeset for help on using the changeset viewer.