From 34ad21bcfa09f3d0190f7526b84981b20661e555 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Tue, 24 Jan 2017 12:03:43 +0000 Subject: [PATCH] Multisite: Remove unnecessary `is_super_admin()` check when adding an existing user to a site. Prior to this change, a super admin user that is added to a site who they are already a member of would still get reinvited. Props supercoder. Fixes #39220. See #37616. Built from https://develop.svn.wordpress.org/trunk@39946 git-svn-id: http://core.svn.wordpress.org/trunk@39883 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/user-new.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php index 16c65301c2..1ea39ba950 100644 --- a/wp-admin/user-new.php +++ b/wp-admin/user-new.php @@ -63,7 +63,7 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) { $redirect = 'user-new.php'; $username = $user_details->user_login; $user_id = $user_details->ID; - if ( ( $username != null && !is_super_admin( $user_id ) ) && ( array_key_exists($blog_id, get_blogs_of_user($user_id)) ) ) { + if ( $username != null && array_key_exists( $blog_id, get_blogs_of_user( $user_id ) ) ) { $redirect = add_query_arg( array('update' => 'addexisting'), 'user-new.php' ); } else { if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 5791d8574b..4ba0bc998a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-39945'; +$wp_version = '4.8-alpha-39946'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.