WordPress.org

Make WordPress Core

Ticket #16629: 16629.diff

File 16629.diff, 928 bytes (added by garyc40, 5 years ago)
  • wp-admin/user-edit.php

    diff --git wp-admin/user-edit.php wp-admin/user-edit.php
    index cf3efd4..f4e2a62 100644
    else 
    255255if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && !isset($super_admins) ) { ?> 
    256256<tr><th><label for="role"><?php _e('Super Admin'); ?></label></th> 
    257257<td> 
    258 <?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) ) : ?> 
     258<?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) || ! is_user_admin( $profileuser->ID ) ) : ?> 
    259259<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.' ); ?></label></p> 
    260260<?php else : ?> 
    261261<p><?php _e( 'Super admin privileges cannot be removed because this user has the network admin email.' ); ?></p>