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
This commit is contained in:
parent
34c9399db8
commit
88c2b69d9e
|
@ -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' ) ) {
|
||||
|
|
Loading…
Reference in New Issue