From 177e0ed93e04a0c4c53ffc4de12b7628a79bfd1e Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 17 Jun 2015 00:02:08 +0000 Subject: [PATCH] Ensure the `create_users` capability check checks the super admin status of the user in question, rather than the current user. git-svn-id: https://develop.svn.wordpress.org/trunk@32811 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/capabilities.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/capabilities.php b/src/wp-includes/capabilities.php index 6a03b8a551..3b296e59e1 100644 --- a/src/wp-includes/capabilities.php +++ b/src/wp-includes/capabilities.php @@ -1376,7 +1376,7 @@ function map_meta_cap( $cap, $user_id ) { case 'create_users': if ( !is_multisite() ) $caps[] = $cap; - elseif ( is_super_admin() || get_site_option( 'add_new_users' ) ) + elseif ( is_super_admin( $user_id ) || get_site_option( 'add_new_users' ) ) $caps[] = $cap; else $caps[] = 'do_not_allow';