Changeset 14003 for trunk/wp-admin/user-edit.php
- Timestamp:
- 04/05/2010 02:59:10 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/user-edit.php
r13941 r14003 59 59 60 60 // Only allow super admins on multisite to edit every user. 61 if ( is_multisite() && ! is_super_admin() && $user_id != $current_user->ID && ! apply_filters( 'enable_edit_any_user_configuration', true ) )61 if ( is_multisite() && ! current_user_can( 'manage_network_users' ) && $user_id != $current_user->ID && ! apply_filters( 'enable_edit_any_user_configuration', true ) ) 62 62 wp_die( __( 'You do not have permission to edit this user.' ) ); 63 63 … … 122 122 delete_user_meta( $user_id, $blog_prefix . 'capabilities' ); 123 123 124 if ( is_multisite() && is_super_admin() && !IS_PROFILE_PAGE)124 if ( is_multisite() && !IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) ) 125 125 empty( $_POST['super_admin'] ) ? revoke_super_admin( $user_id ) : grant_super_admin( $user_id ); 126 126 } … … 142 142 ?> 143 143 144 <?php if ( !IS_PROFILE_PAGE && is_super_admin( $profileuser->ID ) ) { ?>144 <?php if ( !IS_PROFILE_PAGE && is_super_admin( $profileuser->ID ) && current_user_can( 'manage_network_options' ) ) { ?> 145 145 <div class="updated"><p><strong><?php _e('Important:'); ?></strong> <?php _e('This user has super admin privileges.'); ?></p></div> 146 146 <?php } ?> … … 236 236 ?> 237 237 </select> 238 <?php if ( is_multisite() && is_super_admin() ) { ?>238 <?php if ( is_multisite() && current_user_can( 'manage_network_options' ) ) { ?> 239 239 <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> 240 240 <?php } ?>
Note: See TracChangeset
for help on using the changeset viewer.