Delete users that never logged in in drupal 8
Example how to delete users that never logged in in drupal 8
use \Drupal\user\Entity\User;
$ids = \Drupal::entityQuery('user')->execute();
$users = User::loadMultiple($ids);
foreach($users as $user) {
if (!$user->getLastAccessedTime()) {
$user->delete();
}
}