From 88c2b69d9e9c0c6aaf2a03388d01597217ed9900 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Tue, 24 Jan 2017 12:02:25 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@39946 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/user-new.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/user-new.php b/src/wp-admin/user-new.php index 16c65301c2..1ea39ba950 100644 --- a/src/wp-admin/user-new.php +++ b/src/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' ) ) {