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

Fixes #43580.
Built from https://develop.svn.wordpress.org/trunk@42856


git-svn-id: http://core.svn.wordpress.org/trunk@42686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2018-03-19 20:56:32 +00:00
parent 61ba57abb7
commit 80c9ed8bfa
2 changed files with 2 additions and 2 deletions

View File

@ -391,7 +391,7 @@ if ( IS_PROFILE_PAGE ) {
<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profileuser->user_login ); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e( 'Usernames cannot be changed.' ); ?></span></td>
</tr>
<?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() ) : ?>
<?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() && current_user_can( 'promote_user', $profileuser->ID ) ) : ?>
<tr class="user-role-wrap"><th><label for="role"><?php _e( 'Role' ); ?></label></th>
<td><select name="role" id="role">
<?php

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42855';
$wp_version = '5.0-alpha-42856';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.