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:
John Blackbourn 2015-06-17 00:02:08 +00:00
parent 991237783d
commit 177e0ed93e
1 changed files with 1 additions and 1 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';