Overriding the User entity list_builder handler I'm trying to override the User entity list_builder handler to add another column to the table and implement some JavaScript search functionality.

The code I'm using is below which is in my modules mm.module file.

function mm_user_override_entity_type_alter(array &amp;$entity_types) {
  $entity_types['user']-&gt;setHandlerClass('list_builder', 'Drupal\mm_user_list_builder\UserListBuilder');
}


The issue I'm having is this code gives me the following error

Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException&lt;/em&gt;: The &amp;quot;user&amp;quot; entity type did not specify a list_builder handler. 


Which from what I can tell is not correct, even $entity_types['user']-&gt;getHandlerClasses() tells me the list_builder handler exists.

Why is this error happening &amp; how best to resolve it? Or is there a better way for me to add a column &amp; search to the user list page?
my_module.module :

&lt;?php

use Drupal\my_module\MyModuleListBuilder;

function my_module_entity_type_alter(array &amp;$entity_types) {
  $entity_types['user']-&gt;setHandlerClass('list_builder', MyModuleListBuilder::class);
// $entity_types['user']-&gt;setListBuilderClass(MyModuleListBuilder::class); // Other solution possible
}


my_module\src\MyModuleUserListBuilder.php :

&lt;?php

namespace Drupal\my_module;

use Drupal\user\UserListBuilder;

class MyModuleListBuilder extends UserListBuilder {
    // Implement the function you want to edit
}