diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php
index 675ba90069..ae7e75dd93 100644
--- a/wp-admin/includes/ms.php
+++ b/wp-admin/includes/ms.php
@@ -65,12 +65,12 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
do_action( 'delete_blog', $blog_id, $drop );
- $users = get_users_of_blog( $blog_id );
+ $users = get_users( array( 'blog_id' => $blog_id, 'fields' => 'ids' ) );
// Remove users from this blog.
if ( ! empty( $users ) ) {
- foreach ( $users as $user ) {
- remove_user_from_blog( $user->ID, $blog_id) ;
+ foreach ( $users as $user_id ) {
+ remove_user_from_blog( $user_id, $blog_id) ;
}
}
diff --git a/wp-admin/network/edit.php b/wp-admin/network/edit.php
index be1b0b7e1a..5ada735a1f 100644
--- a/wp-admin/network/edit.php
+++ b/wp-admin/network/edit.php
@@ -52,7 +52,7 @@ function confirm_delete_users( $users ) {