Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/18/2010 07:43:08 PM (15 years ago)
Author:
djpaul
Message:

Make sure core components' names get correctly added to the list of Banned Names in multisite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-core/bp-core-signup.php

    r3321 r3441  
    286286        $db_illegal_names = implode( ' ', $names );
    287287
     288    // Add the core components' slugs to the banned list even if their components aren't active.
     289    $bp_component_slugs = array( 'groups', 'members', 'forums', 'blogs', 'activity', 'profile', 'friends', 'search', 'settings', 'register', 'activate' );
     290
     291    if ( defined( 'BP_GROUPS_SLUG' ) )
     292        $bp_component_slugs[] = BP_GROUPS_SLUG;
     293
     294    if ( defined( 'BP_MEMBERS_SLUG' ) )
     295        $bp_component_slugs[] = BP_MEMBERS_SLUG;
     296
     297    if ( defined( 'BP_FORUMS_SLUG' ) )
     298        $bp_component_slugs[] = BP_FORUMS_SLUG;
     299
     300    if ( defined( 'BP_BLOGS_SLUG' ) )
     301        $bp_component_slugs[] = BP_BLOGS_SLUG;
     302
     303    if ( defined( 'BP_ACTIVITY_SLUG' ) )
     304        $bp_component_slugs[] = BP_ACTIVITY_SLUG;
     305
     306    if ( defined( 'BP_XPROFILE_SLUG' ) )
     307        $bp_component_slugs[] = BP_XPROFILE_SLUG;
     308
     309    if ( defined( 'BP_FRIENDS_SLUG' ) )
     310        $bp_component_slugs[] = BP_FRIENDS_SLUG;
     311
     312    if ( defined( 'BP_SEARCH_SLUG' ) )
     313        $bp_component_slugs[] = BP_SEARCH_SLUG;
     314
     315    if ( defined( 'BP_SETTINGS_SLUG' ) )
     316        $bp_component_slugs[] = BP_SETTINGS_SLUG;
     317
     318    if ( defined( 'BP_REGISTER_SLUG' ) )
     319        $bp_component_slugs[] = BP_REGISTER_SLUG;
     320
     321    if ( defined( 'BP_ACTIVATION_SLUG' ) )
     322        $bp_component_slugs[] = BP_ACTIVATION_SLUG;
     323   
    288324    // Add our slugs to the array and allow them to be filtered
    289     $filtered_illegal_names = apply_filters( 'bp_core_illegal_usernames', array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator', BP_GROUPS_SLUG, BP_MEMBERS_SLUG, BP_FORUMS_SLUG, BP_BLOGS_SLUG, BP_ACTIVITY_SLUG, BP_XPROFILE_SLUG, BP_FRIENDS_SLUG, BP_SEARCH_SLUG, BP_SETTINGS_SLUG, BP_REGISTER_SLUG, BP_ACTIVATION_SLUG ) );
     325    $filtered_illegal_names = apply_filters( 'bp_core_illegal_usernames', array_merge( array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' ), $bp_component_slugs ) );
    290326
    291327    // Merge the arrays together
Note: See TracChangeset for help on using the changeset viewer.