WordPress.org

Make WordPress Core

Changeset 39934


Ignore:
Timestamp:
01/20/2017 05:42:21 PM (5 years ago)
Author:
flixos90
Message:

Multisite: Replace is_super_admin() with manage_network_users when checking for users autocomplete capabilities.

Props ashokkumar24.
Fixes #39201. See #37616.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r39908 r39934  
    247247
    248248    /** This filter is documented in wp-admin/user-new.php */
    249     if ( ! is_super_admin() && ! apply_filters( 'autocomplete_users_for_site_admins', false ) )
     249    if ( ! current_user_can( 'manage_network_users' ) && ! apply_filters( 'autocomplete_users_for_site_admins', false ) )
    250250        wp_die( -1 );
    251251
  • trunk/src/wp-admin/user-new.php

    r39006 r39934  
    226226 */
    227227if ( is_multisite() && current_user_can( 'promote_users' ) && ! wp_is_large_network( 'users' )
    228     && ( is_super_admin() || apply_filters( 'autocomplete_users_for_site_admins', false ) )
     228    && ( current_user_can( 'manage_network_users' ) || apply_filters( 'autocomplete_users_for_site_admins', false ) )
    229229) {
    230230    wp_enqueue_script( 'user-suggest' );
Note: See TracChangeset for help on using the changeset viewer.