From 3c5457259b03466a0237c8cbb163db286b5cf71b Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Thu, 4 Nov 2010 09:06:45 +0000 Subject: [PATCH] When adding a user to the blog pass in the current blog id. See #15316. git-svn-id: https://develop.svn.wordpress.org/trunk@16178 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/ms-functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 1171a6579d..462678e964 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -1393,8 +1393,10 @@ function maybe_add_existing_user_to_blog() { } function add_existing_user_to_blog( $details = false ) { + global $blog_id; + if ( is_array( $details ) ) { - $result = add_user_to_blog( '', $details[ 'user_id' ], $details[ 'role' ] ); + $result = add_user_to_blog( $blog_id, $details[ 'user_id' ], $details[ 'role' ] ); do_action( 'added_existing_user', $details[ 'user_id' ], $result ); } return $result;