When adding a user to the blog pass in the current blog id. See #15316.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fb004d24be
commit
2855be97ac
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue