code: def delete_user(username, uid=None):
      '''
      Delete a user
  
      CLI Example:
  
      .. code-block:: bash
  
          salt dell drac.delete_user [USERNAME] [UID - optional]
          salt dell drac.delete_user diana 4
      '''
      if uid is None:
          user = list_users()
          uid = user[username]['index']
  
      if uid:
          return __execute_cmd('config -g cfgUserAdmin -o \
                                cfgUserAdminUserName -i {0} ""'.format(uid))
  
      else:
          log.warning('\'%s\' does not exist', username)
          return False
  
      return Truf delete_user(username, uid=None):
      '''
      Delete a user
  
      CLI Example:
  
      .. code-block:: bash
  
          salt dell drac.delete_user [USERNAME] [UID - optional]
          salt dell drac.delete_user diana 4
      '''
      if uid is None:
          user = list_users()
          uid = user[username]['index']
  
      if uid:
          return __execute_cmd('config -g cfgUserAdmin -o \
                                cfgUserAdminUserName -i {0} ""'.format(uid))
  
      else:
          log.warning('\'%s\' does not exist', username)
          return False
  
      return True
docs: Delete a user
  
      CLI Example:
  
      .. code-block:: bash
  
          salt dell drac.delete_user [USERNAME] [UID - optional]
          salt dell drac.delete_user diana 4