Users: Don't show roles dropdown on user-edit.php if current user cannot promote user.
Fixes #43580. git-svn-id: https://develop.svn.wordpress.org/trunk@42856 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
877a59a843
commit
0cc1c11049
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue