original_docstring: 
      Change the home directory of the user, pass True for persist to move files
      to the new home directory if the old home directory exist.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' user.chhome foo \\\\fileserver\\home\\foo True
      
docstring: Change the home directory of the user, pass True for persist to move files
  to the new home directory if the old home directory exist.
  
  CLI Example.
  
  code-block:: bash
  
  
docstring_tokens: Change the home directory of the user pass True for persist to move files to the new home directory if the old home directory exist . CLI Example . code - block :: bash
code: def chhome(name, home, persist=False):
      '''
      Change the home directory of the user, pass True for persist to move files
      to the new home directory if the old home directory exist.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' user.chhome foo \\\\fileserver\\home\\foo True
      '''
      pre_info = info(name)
  
      if not pre_info:
          return False
  
      if home == pre_info['home']:
          return True
  
      if not update(name=name, home=home):
          return False
  
      if persist and home is not None and pre_info['home'] is not None:
          cmd = 'move /Y {0} {1}'.format(pre_info['home'], home)
          if __salt__['cmd.retcode'](cmd, python_shell=False) != 0:
              log.debug('Failed to move the contents of the Home Directory')
  
      post_info = info(name)
      if post_info['home'] != pre_info['home']:
          return post_info['home'] == home
  
      return False
code_tokens: def chhome ( name , home , persist = False ) : pre_info = info ( name ) if not pre_info : return False if home == pre_info [ 'home' ] : return True if not update ( name = name , home = home ) : return False if persist and home is not None and pre_info [ 'home' ] is not None : cmd = 'move /Y {0} {1}' . format ( pre_info [ 'home' ] , home ) if __salt__ [ 'cmd.retcode' ] ( cmd , python_shell = False ) != 0 : log . debug ( 'Failed to move the contents of the Home Directory' ) post_info = info ( name ) if post_info [ 'home' ] != pre_info [ 'home' ] : return post_info [ 'home' ] == home return False
short_docstring: Change the home directory of the user, pass True for persist to move files
  to the new home directory if the old home directory exist.
short_docstring_tokens: Change the home directory of the user pass True for persist to move files to the new home directory if the old home directory exist .
comment: '''
      Change the home directory of the user, pass True for persist to move files
      to the new home directory if the old home directory exist.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' user.chhome foo \\\\fileserver\\home\\foo True
      '''