Skip to content

Commit 90583c8

Browse files
committed
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
1 parent 5f9b52d commit 90583c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-admin/user-new.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
<div id="ajax-response"></div>
311311

312312
<?php
313-
if ( is_multisite() ) {
313+
if ( is_multisite() && current_user_can( 'promote_users' ) ) {
314314
if ( $do_both )
315315
echo '<h2 id="add-existing-user">' . __( 'Add Existing User' ) . '</h2>';
316316
if ( ! current_user_can( 'manage_network_users' ) ) {

0 commit comments

Comments
 (0)