Make sure create_users is strippped from blog admins for multisite setups where add_new_users is not enabled. see #15357
git-svn-id: https://develop.svn.wordpress.org/trunk@16551 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
33e3c14b11
commit
c37f65296a
@ -985,8 +985,12 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
}
|
||||
break;
|
||||
case 'create_users':
|
||||
if ( !is_multisite() || is_super_admin() || get_site_option( 'add_new_users' ) )
|
||||
if ( !is_multisite() )
|
||||
$caps[] = $cap;
|
||||
elseif ( is_super_admin() || get_site_option( 'add_new_users' ) )
|
||||
$caps[] = $cap;
|
||||
else
|
||||
$caps[] = 'do_not_allow';
|
||||
break;
|
||||
default:
|
||||
// Handle meta capabilities for custom post types.
|
||||
|
Loading…
Reference in New Issue
Block a user