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
This commit is contained in:
parent
d3a4aa7e29
commit
715edd6d00
|
@ -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' ];
|
||||
|
|
Loading…
Reference in New Issue