delete user not working

WordPress should give this option below Attribute all posts to:

Anyhow, I wrote a post on this (Clean Comments Table After User Deleted)

Edit

Also, you can move your all posts from deleted users to admin user.

global $wpdb;
$admin_id = 1; // Assign admin user id here
$posts_table = $wpdb->prefix . 'posts';
$users_table = $wpdb->prefix . 'users';
$strQuery = "UPDATE `$posts_table` SET post_author = $admin_id WHERE post_author NOT IN (SELECT ID FROM $users_table)";
echo $strQuery;
$wpdb->query($strQuery);