- Issue created by @Anybody
- 🇵🇱Poland sebaz
What is new in this concept when you can use dependency injection or just override User entity clas by your own class set in hook_entity_type_alter()
/** * Implements hook_entity_type_alter(). */ function my_module_entity_type_alter(array &$entity_types) { if (isset($entity_types['user'])) { $entity_types['user']->setClass(\Drupal\my_module\Entity\CustomUser::class); } }
?