public function transferChangesToExistingEntity(UserInterface $newEntity, UserInterface $existingEntity)
 {
     $existingEntity->setUsername($newEntity->getUsername());
     $existingEntity->setEmail($newEntity->getEmail());
     $existingEntity->setDisplayName($newEntity->getDisplayName());
     $existingEntity->setState($newEntity->getState());
     $passwordHash = $newEntity->getPassword();
     if (!empty($passwordHash)) {
         $existingEntity->setPassword($passwordHash);
     }
 }