From 715edd6d007c8adcea26c369f59c736f254589c4 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 28 Feb 2013 20:28:36 +0000 Subject: [PATCH] Remove direct call to add_new_user_to_blog() as this is already hooked into wpmu_activate_user. The second argument passed by that hook is not $email, so let's change that. It is not used. props wonderboymusic. fixes #15173. git-svn-id: https://develop.svn.wordpress.org/trunk@23535 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/ms-functions.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 8cf2c1ce8b..672d650215 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -811,7 +811,6 @@ function wpmu_signup_user_notification($user, $user_email, $key, $meta = '') { * @uses wp_generate_password() * @uses wpmu_welcome_user_notification() * @uses add_user_to_blog() - * @uses add_new_user_to_blog() * @uses wpmu_create_user() * @uses wpmu_create_blog() * @uses wpmu_welcome_notification() @@ -857,11 +856,9 @@ function wpmu_activate_signup($key) { if ( isset( $user_already_exists ) ) return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup); - wpmu_welcome_user_notification($user_id, $password, $meta); - - add_new_user_to_blog( $user_id, $user_email, $meta ); - do_action('wpmu_activate_user', $user_id, $password, $meta); - return array('user_id' => $user_id, 'password' => $password, 'meta' => $meta); + wpmu_welcome_user_notification( $user_id, $password, $meta ); + do_action( 'wpmu_activate_user', $user_id, $password, $meta ); + return array( 'user_id' => $user_id, 'password' => $password, 'meta' => $meta ); } $blog_id = wpmu_create_blog( $signup->domain, $signup->path, $signup->title, $user_id, $meta, $wpdb->siteid ); @@ -1677,13 +1674,17 @@ function add_existing_user_to_blog( $details = false ) { /** * Add a newly created user to the appropriate blog * + * To add a user in general, use add_user_to_blog(). This function + * is specifically hooked into the wpmu_activate_user action. + * * @since MU + * @see add_user_to_blog() * * @param int $user_id - * @param string $email + * @param mixed $password Ignored. * @param array $meta */ -function add_new_user_to_blog( $user_id, $email, $meta ) { +function add_new_user_to_blog( $user_id, $password, $meta ) { global $current_site; if ( !empty( $meta[ 'add_to_blog' ] ) ) { $blog_id = $meta[ 'add_to_blog' ];