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
This commit is contained in:
John Blackbourn 2015-06-17 00:03:27 +00:00
parent 25829e05fa
commit 4ad1dc2a1b
2 changed files with 2 additions and 2 deletions

View File

@ -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';

View File

@ -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.