Ensure the `create_users` capability check checks the super admin status of the user in question, rather than the current user.
git-svn-id: https://develop.svn.wordpress.org/trunk@32811 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
991237783d
commit
177e0ed93e
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue