diff --git a/src/wp-admin/network/users.php b/src/wp-admin/network/users.php index 7cfdf190c2..650c3ca089 100644 --- a/src/wp-admin/network/users.php +++ b/src/wp-admin/network/users.php @@ -18,34 +18,46 @@ if ( ! current_user_can( 'manage_network_users' ) ) function confirm_delete_users( $users ) { $current_user = wp_get_current_user(); - if ( !is_array( $users ) ) + if ( ! is_array( $users ) || empty( $users ) ) { return false; + } ?>

-

+ + 1 ) : ?> +

+ +

+ +
ID . '">' . $current_user->user_login . ''; - - foreach ( ( $allusers = (array) $_POST['allusers'] ) as $user_id ) { + $admin_out = ''; ?> + + ID ) ) + if ( ! current_user_can( 'delete_user', $delete_user->ID ) ) { wp_die( sprintf( __( 'Warning! User %s cannot be deleted.' ), $delete_user->user_login ) ); + } - if ( in_array( $delete_user->user_login, $site_admins ) ) - wp_die( sprintf( __( 'Warning! User cannot be deleted. The user %s is a network administrator.' ), $delete_user->user_login ) ); + if ( in_array( $delete_user->user_login, $site_admins ) ) { + wp_die( sprintf( __( 'Warning! User cannot be deleted. The user %s is a network administrator.' ), '' . $delete_user->user_login . '' ) ); + } + ?> + + + \n"; - $blogs = get_blogs_of_user( $user_id, true ); - - if ( !empty( $blogs ) ) { + if ( ! empty( $blogs ) ) { ?> -

' . $delete_user->user_login . '' ); ?>

+
"; + } else { + ?> + + +
user_login; ?> + ' . "\n"; ?> +

' . $delete_user->user_login . '' ); ?>

$details ) { $blog_users = get_users( array( 'blog_id' => $details->userblog_id, 'fields' => array( 'ID', 'user_login' ) ) ); @@ -55,11 +67,13 @@ function confirm_delete_users( $users ) { $user_dropdown .= "\n"; ?> @@ -73,14 +87,28 @@ function confirm_delete_users( $users ) { "; - } + echo "

+ +
+ 1 ) : ?> +

+ +

+