Make WordPress Core

Changeset 42856


Ignore:
Timestamp:
03/19/2018 08:55:20 PM (7 years ago)
Author:
ocean90
Message:

Users: Don't show roles dropdown on user-edit.php if current user cannot promote user.

Fixes #43580.

File:
1 edited

Legend:

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

    r42827 r42856  
    392392    </tr>
    393393
    394 <?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() ) : ?>
     394<?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() && current_user_can( 'promote_user', $profileuser->ID ) ) : ?>
    395395<tr class="user-role-wrap"><th><label for="role"><?php _e( 'Role' ); ?></label></th>
    396396<td><select name="role" id="role">
Note: See TracChangeset for help on using the changeset viewer.