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
This commit is contained in:
Peter Westwood 2010-11-04 09:06:45 +00:00
parent fa9fc10c6e
commit 3c5457259b

View File

@ -1393,8 +1393,10 @@ function maybe_add_existing_user_to_blog() {
} }
function add_existing_user_to_blog( $details = false ) { function add_existing_user_to_blog( $details = false ) {
global $blog_id;
if ( is_array( $details ) ) { 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 ); do_action( 'added_existing_user', $details[ 'user_id' ], $result );
} }
return $result; return $result;