Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/06/2011 03:17:09 PM (11 years ago)
Author:
boonebgorges
Message:

Refactors registration.php requires so they don't require an additional function. Fixes #2997. Props nacin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-signup.php

    r3661 r3666  
    3535        /* Check the nonce */
    3636        check_admin_referer( 'bp_new_signup' );
    37 
    38         bp_core_maybe_include_user_registration_file();
    3937
    4038        /* Check the base account details for problems */
     
    217215    /* Check if an activation key has been passed */
    218216    if ( isset( $_GET['key'] ) ) {
    219 
    220         bp_core_maybe_include_user_registration_file();
    221217
    222218        /* Activate the signup */
     
    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 );
     
    430429    } else {
    431430        $errors = new WP_Error();
     431
     432        if ( ! function_exists( 'wp_insert_user' ) )
     433            require_once( ABSPATH . WPINC . '/registration.php' );
    432434
    433435        $user_id = wp_insert_user( array(
     
    537539    }
    538540
    539     /* Update the user_url and display_name */
     541    // Update the user_url and display_name
     542    // Support for WP < 3.1
     543    if ( ! function_exists( 'wp_update_user' ) )
     544        require_once( ABSPATH . WPINC . '/registration.php' );
     545       
    540546    wp_update_user( array( 'ID' => $user_id, 'user_url' => bp_core_get_user_domain( $user_id ), 'display_name' => bp_core_get_user_displayname( $user_id ) ) );
    541547
Note: See TracChangeset for help on using the changeset viewer.