Cast to int

git-svn-id: http://svn.automattic.com/wordpress/trunk@15151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-06-06 15:12:47 +00:00
parent 8d6108baa4
commit 68848f7970
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.' ) );