Cast to int
git-svn-id: https://develop.svn.wordpress.org/trunk@15151 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
596e012bbf
commit
6db04b89ed
@ -66,6 +66,8 @@ case 'promote':
|
||||
$userids = $_REQUEST['users'];
|
||||
$update = 'promote';
|
||||
foreach ( $userids as $id ) {
|
||||
$id = (int) $id;
|
||||
|
||||
if ( ! current_user_can('promote_user', $id) )
|
||||
wp_die(__('You can’t edit that user.'));
|
||||
// The new role of the current user must also have promote_users caps
|
||||
@ -106,6 +108,8 @@ case 'dodelete':
|
||||
$delete_count = 0;
|
||||
|
||||
foreach ( (array) $userids as $id) {
|
||||
$id = (int) $id;
|
||||
|
||||
if ( ! current_user_can( 'delete_user', $id ) )
|
||||
wp_die(__( 'You can’t delete that user.' ) );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user