WordPress.org

Make WordPress Core

Ticket #33800: 33800.diff

File 33800.diff, 406 bytes (added by dipesh.kakadiya, 6 years ago)

Add check into 'wp_delete_user' for varify id is numeric value or not

  • src/wp-admin/includes/user.php

     
    272272 */
    273273function wp_delete_user( $id, $reassign = null ) {
    274274        global $wpdb;
    275 
     275        if ( ! is_numeric( $id )  ){
     276                return false;
     277        }
    276278        $id = (int) $id;
    277279        $user = new WP_User( $id );
    278280