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


git-svn-id: https://develop.svn.wordpress.org/trunk@41122 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2017-07-23 01:13:13 +00:00
parent 5f9b52df35
commit 90583c8360

View File

@ -310,7 +310,7 @@ if ( ! empty( $messages ) ) {
<div id="ajax-response"></div>
<?php
if ( is_multisite() ) {
if ( is_multisite() && current_user_can( 'promote_users' ) ) {
if ( $do_both )
echo '<h2 id="add-existing-user">' . __( 'Add Existing User' ) . '</h2>';
if ( ! current_user_can( 'manage_network_users' ) ) {