Make sure create_users is strippped from blog admins for multisite setups where add_new_users is not enabled. see #15357
git-svn-id: http://svn.automattic.com/wordpress/trunk@16551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da6fe519f3
commit
104c9ed3d8
|
@ -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