diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index 44c3501253..32ccc45e54 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -831,18 +831,18 @@ function revoke_super_admin( $user_id ) { do_action( 'revoke_super_admin', $user_id ); $admin_email = get_site_option( 'admin_email' ); + $super_admins = get_site_option( 'site_admins', array( 'admin' ) ); $user = new WP_User( $user_id ); if ( $user->user_email != $admin_email ) { foreach ( $super_admins as $key => $username ) { if ( $username == $user->user_login ) { unset( $super_admins[$key] ); + update_site_option( 'site_admins' , $super_admins ); do_action( 'revoked_super_admin', $user_id ); break; } } } - - update_site_option( 'site_admins' , $super_admins ); } ?>