WordPress.org

Make WordPress Core

Changeset 39935


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

Multisite: Replace is_super_admin() with manage_network_users when trying to add an existing user via username.

Props dhanendran.
Fixes #39202. See #37616.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/user-new.php

    r39934 r39935  
    3838        $user_details = get_user_by( 'email', $user_email );
    3939    } else {
    40         if ( is_super_admin() ) {
     40        if ( current_user_can( 'manage_network_users' ) ) {
    4141            $user_details = get_user_by( 'login', $user_email );
    4242        } else {
     
    314314    if ( $do_both )
    315315        echo '<h2 id="add-existing-user">' . __( 'Add Existing User' ) . '</h2>';
    316     if ( !is_super_admin() ) {
     316    if ( ! current_user_can( 'manage_network_users' ) ) {
    317317        echo '<p>' . __( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ) . '</p>';
    318318        $label = __('Email');
Note: See TracChangeset for help on using the changeset viewer.