Ticket #43390: 43390.diff
File 43390.diff, 1.2 KB (added by , 7 years ago) |
---|
-
wp-includes/capabilities.php
766 766 if ( isset( $super_admins ) ) { 767 767 return $super_admins; 768 768 } else { 769 return get_site_option( 'site_admins', array( 'admin') );769 return get_site_option( 'site_admins', array() ); 770 770 } 771 771 } 772 772 … … 830 830 do_action( 'grant_super_admin', $user_id ); 831 831 832 832 // Directly fetch site_admins instead of using get_super_admins() 833 $super_admins = get_site_option( 'site_admins', array( 'admin') );833 $super_admins = get_site_option( 'site_admins', array() ); 834 834 835 835 $user = get_userdata( $user_id ); 836 836 if ( $user && ! in_array( $user->user_login, $super_admins ) ) { … … 877 877 do_action( 'revoke_super_admin', $user_id ); 878 878 879 879 // Directly fetch site_admins instead of using get_super_admins() 880 $super_admins = get_site_option( 'site_admins', array( 'admin') );880 $super_admins = get_site_option( 'site_admins', array() ); 881 881 882 882 $user = get_userdata( $user_id ); 883 883 if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {