bp_core_illegal_names

  • apply_filters( 'bp_core_illegal_names', $illegal_names )

    Source Reference:

    • Component: BuddyPress :: bp-members
      File: /bp-members/bp-members-signup.php :: Trac Source Line: 287
      	// Add our slugs to the array and allow them to be filtered
      	$filtered_illegal_names = apply_filters( 'bp_core_illegal_usernames', array_merge( array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' ), $bp_component_slugs ) );
      
      	// Merge the arrays together
      	$merged_names           = array_merge( (array)$filtered_illegal_names, (array)$db_illegal_names );
      
      	// Remove duplicates
      	$illegal_names          = array_unique( (array)$merged_names );
      
      	return apply_filters( 'bp_core_illegal_names', $illegal_names );
      }
      add_filter( 'pre_update_site_option_illegal_names', 'bp_core_get_illegal_names', 10, 2 );
      
      /**
       * Validate a user name and email address when creating a new user.
       *
       * @global object $wpdb DB Layer
       * @param string $user_name Username to validate
       * @param string $user_email Email address to validate
       * @return array Results of user validation including errors, if any
      

Comments are closed.