Make WordPress Core

Changeset 48042


Ignore:
Timestamp:
06/14/2020 05:01:51 PM (4 years ago)
Author:
ocean90
Message:

Users: On the 'Add New User' screen, don't show the roles dropdown if the current user can't promote other users.

Fixes #50345.

File:
1 edited

Legend:

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

    r47808 r48042  
    576576    </tr>
    577577    <?php } // End if ! is_multisite(). ?>
     578    <?php if ( current_user_can( 'promote_users' ) ) { ?>
    578579    <tr class="form-field">
    579580        <th scope="row"><label for="role"><?php _e( 'Role' ); ?></label></th>
     
    588589        </td>
    589590    </tr>
     591    <?php } ?>
    590592    <?php if ( is_multisite() && current_user_can( 'manage_network_users' ) ) { ?>
    591593    <tr>
Note: See TracChangeset for help on using the changeset viewer.