From 4ad1dc2a1b210337cac6342665bd59c3186801ed Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 17 Jun 2015 00:03:27 +0000 Subject: [PATCH] Ensure the `create_users` capability check checks the super admin status of the user in question, rather than the current user. Built from https://develop.svn.wordpress.org/trunk@32811 git-svn-id: http://core.svn.wordpress.org/trunk@32782 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/capabilities.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 6a03b8a551..3b296e59e1 100644 --- a/wp-includes/capabilities.php +++ b/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'; diff --git a/wp-includes/version.php b/wp-includes/version.php index 624a0aa573..9295c5bc34 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32810'; +$wp_version = '4.3-alpha-32811'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.