Skip to:
Content

BuddyPress.org

Ticket #2997: 2997.diff

File 2997.diff, 4.0 KB (added by nacin, 15 years ago)
  • bp-activity.php

     
    546546        $activity = new BP_Activity_Activity( $activity_id );
    547547
    548548        if ( $usernames = bp_activity_find_mentions( strip_tags( $activity->content ) ) ) {
    549                 bp_core_maybe_include_user_registration_file();
     549                if ( ! function_exists( 'username_exists' ) )
     550                        require_once( ABSPATH . WPINC . '/registration.php' );
    550551
    551552                foreach( (array)$usernames as $username ) {
    552553                        if ( !$user_id = username_exists( $username ) )
  • bp-core/bp-core-signup.php

     
    3535                /* Check the nonce */
    3636                check_admin_referer( 'bp_new_signup' );
    3737
    38                 bp_core_maybe_include_user_registration_file();
    39 
    4038                /* Check the base account details for problems */
    4139                $account_details = bp_core_validate_user_signup( $_POST['signup_username'], $_POST['signup_email'] );
    4240
     
    217215        /* Check if an activation key has been passed */
    218216        if ( isset( $_GET['key'] ) ) {
    219217
    220                 bp_core_maybe_include_user_registration_file();
    221 
    222218                /* Activate the signup */
    223219                $user = apply_filters( 'bp_core_activate_account', bp_core_activate_signup( $_GET['key'] ) );
    224220
     
    352348function bp_core_validate_user_signup( $user_name, $user_email ) {
    353349        global $wpdb;
    354350
     351        if ( ! function_exists( 'validate_username' ) )
     352                require_once( ABSPATH . WPINC . '/registration.php' );
     353
    355354        $errors = new WP_Error();
    356355        $user_email = sanitize_email( $user_email );
    357356
     
    430429        } else {
    431430                $errors = new WP_Error();
    432431
     432                if ( ! function_exists( 'wp_insert_user' ) )
     433                        require_once( ABSPATH . WPINC . '/registration.php' );
     434
    433435                $user_id = wp_insert_user( array(
    434436                        'user_login' => $user_login,
    435437                        'user_pass' => $user_password,
  • bp-core/bp-core-settings.php

     
    5151        if ( isset($_POST['submit']) ) {
    5252                check_admin_referer('bp_settings_general');
    5353
    54                 bp_core_maybe_include_user_registration_file();
     54                if ( ! function_exists( 'email_exists' ) )
     55                        require_once( ABSPATH . WPINC . '/registration.php' );
    5556
    5657                // Form has been submitted and nonce checks out, lets do it.
    5758
  • bp-activity/bp-activity-filters.php

     
    113113 * @param string $content The activity content
    114114 */
    115115function bp_activity_at_name_filter( $content ) {
    116         bp_core_maybe_include_user_registration_file();
     116        if ( ! function_exists( 'username_exists' ) )
     117                require_once( ABSPATH . WPINC . '/registration.php' );
    117118
    118119        $usernames = bp_activity_find_mentions( $content );
    119120
  • bp-blogs/bp-blogs-templatetags.php

     
    325325        global $current_user, $current_site;
    326326        global $bp;
    327327
    328         bp_core_maybe_include_user_registration_file();
    329 
    330328        if ( isset($_POST['submit']) ) {
    331329                bp_blogs_validate_blog_signup();
    332330        } else {
  • bp-core.php

     
    285285}
    286286
    287287/**
    288  * If we're not on WordPress 3.1+, then include the file containing the user registration methods.
    289  *
    290  * @global float $wp_version WordPress version number
    291  * @since 1.3
    292  */
    293 function bp_core_maybe_include_user_registration_file() {
    294         global $wp_version;
    295 
    296         if ( $wp_version >= 3.1 )
    297                 return;
    298 
    299         require_once( ABSPATH . WPINC . '/registration.php' );
    300 }
    301 
    302 /**
    303288 * bp_core_admin_menu_init()
    304289 *
    305290 * Initializes the wp-admin area "BuddyPress" menus and sub menus.