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

Built from https://develop.svn.wordpress.org/trunk@41122


git-svn-id: http://core.svn.wordpress.org/trunk@40962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn
2017-07-23 01:14:43 +00:00
parent 1d71fa865c
commit 2d464d4286
2 changed files with 2 additions and 2 deletions

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' ) ) {