mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
Cast to int
git-svn-id: http://svn.automattic.com/wordpress/trunk@15151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8d6108baa4
commit
68848f7970
@ -66,6 +66,8 @@ case 'promote':
|
|||||||
$userids = $_REQUEST['users'];
|
$userids = $_REQUEST['users'];
|
||||||
$update = 'promote';
|
$update = 'promote';
|
||||||
foreach ( $userids as $id ) {
|
foreach ( $userids as $id ) {
|
||||||
|
$id = (int) $id;
|
||||||
|
|
||||||
if ( ! current_user_can('promote_user', $id) )
|
if ( ! current_user_can('promote_user', $id) )
|
||||||
wp_die(__('You can’t edit that user.'));
|
wp_die(__('You can’t edit that user.'));
|
||||||
// The new role of the current user must also have promote_users caps
|
// The new role of the current user must also have promote_users caps
|
||||||
@ -106,6 +108,8 @@ case 'dodelete':
|
|||||||
$delete_count = 0;
|
$delete_count = 0;
|
||||||
|
|
||||||
foreach ( (array) $userids as $id) {
|
foreach ( (array) $userids as $id) {
|
||||||
|
$id = (int) $id;
|
||||||
|
|
||||||
if ( ! current_user_can( 'delete_user', $id ) )
|
if ( ! current_user_can( 'delete_user', $id ) )
|
||||||
wp_die(__( 'You can’t delete that user.' ) );
|
wp_die(__( 'You can’t delete that user.' ) );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user