Make WordPress Core

Changeset 41122


Ignore:
Timestamp:
07/23/2017 01:13:13 AM (7 years ago)
Author:
johnbillion
Message:

Users: Don't show the 'Add Existing User' form on the 'Add New User' screen to users without the promote_users capability.

Props bseddon, Mista-Flo

Fixes #37836

File:
1 edited

Legend:

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

    r39946 r41122  
    311311
    312312<?php
    313 if ( is_multisite() ) {
     313if ( is_multisite() && current_user_can( 'promote_users' ) ) {
    314314    if ( $do_both )
    315315        echo '<h2 id="add-existing-user">' . __( 'Add Existing User' ) . '</h2>';
Note: See TracChangeset for help on using the changeset viewer.