UserEntityNormalizer.php in Tome 8
File
modules/tome_sync/src/Normalizer/UserEntityNormalizer.php
View source
<?php
namespace Drupal\tome_sync\Normalizer;
class UserEntityNormalizer extends ContentEntityNormalizer {
protected $supportedInterfaceOrClass = 'Drupal\\user\\UserInterface';
public function normalize($entity, $format = NULL, array $context = []) {
$values = parent::normalize($entity, $format, $context);
$excluded_user_keys = [
'access',
'login',
'init',
];
$values = array_diff_key($values, array_flip($excluded_user_keys));
return $values;
}
}