mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
25829e05fa
commit
4ad1dc2a1b
@ -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';
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user