Cast to int

git-svn-id: https://develop.svn.wordpress.org/trunk@15151 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-06-06 15:12:47 +00:00
parent 596e012bbf
commit 6db04b89ed
1 changed files with 4 additions and 0 deletions

View File

@ -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.' ) );