original_string: protected function updateUserFields(UserInterface $user)
      {
          if (null === $this->userDiscriminator) {
              $this->userDiscriminator = $this->container->get('rollerworks_multi_user.user_discriminator');
          }
  
          // Can only use the user manager when there is an user-system active
          if (null === $this->userDiscriminator->getCurrentUser() || true !== $this->userDiscriminator->getCurrentUserConfig()->getConfig('use_listener', true)) {
              return;
          }
  
          if (null === $this->userManager) {
              $this->userManager = $this->container->get('fos_user.user_manager');
          }
  
          $this->userManager->updateCanonicalFields($user);
          $this->userManager->updatePassword($user);
      }
code: protected function updateUserFields(UserInterface $user)
      {
          if (null === $this->userDiscriminator) {
              $this->userDiscriminator = $this->container->get('rollerworks_multi_user.user_discriminator');
          }
  
          // Can only use the user manager when there is an user-system active
          if (null === $this->userDiscriminator->getCurrentUser() || true !== $this->userDiscriminator->getCurrentUserConfig()->getConfig('use_listener', true)) {
              return;
          }
  
          if (null === $this->userManager) {
              $this->userManager = $this->container->get('fos_user.user_manager');
          }
  
          $this->userManager->updateCanonicalFields($user);
          $this->userManager->updatePassword($user);
      }
code_tokens: protected function updateUserFields ( UserInterface $ user ) { if ( null === $ this -> userDiscriminator ) { $ this -> userDiscriminator = $ this -> container -> get ( 'rollerworks_multi_user.user_discriminator' ) ; } // Can only use the user manager when there is an user-system active if ( null === $ this -> userDiscriminator -> getCurrentUser ( ) || true !== $ this -> userDiscriminator -> getCurrentUserConfig ( ) -> getConfig ( 'use_listener' , true ) ) { return ; } if ( null === $ this -> userManager ) { $ this -> userManager = $ this -> container -> get ( 'fos_user.user_manager' ) ; } $ this -> userManager -> updateCanonicalFields ( $ user ) ; $ this -> userManager -> updatePassword ( $ user ) ; }
docstring: This must be called on prePersist and preUpdate if the event is about a
  user.
  
  @param UserInterface $user
docstring_tokens: This must be called on prePersist and preUpdate if the event is about a user .