<?xml version="1.0" encoding="utf-8"?>
<Query ID="6de7cc40-bac4-4d02-b199-a3e4d2aaf940" Name="Users.query" AppendCompletionExpressions="false">
  <Settings />
  <Source Repository="Secondary users" Item="Users.index" Type="Dynamicweb.Indexing.Queries.IndexQueryProvider, Dynamicweb.Core" />
  <Parameters>
    <Parameter Name="userquery" Type="System.String" DefaultValue="" />
  </Parameters>
  <SortOrder>
    <Sort Field="UserName" Direction="Ascending" />
  </SortOrder>
  <Expressions>
    <GroupExpression Operator="And">
      <GroupExpression Operator="And">
        <BinaryExpression Operator="Contains" Disabled="false">
          <Left>
            <FieldExpression Field="SearchField" />
          </Left>
          <Right>
            <ParameterExpression Name="userquery" />
          </Right>
        </BinaryExpression>
        <BinaryExpression Operator="Equal" Disabled="false">
          <Left>
            <FieldExpression Field="Active" />
          </Left>
          <Right>
            <TermExpression Value="True" DisplayValue="True" Type="System.Boolean" />
          </Right>
        </BinaryExpression>
      </GroupExpression>
      <GroupExpression Operator="Or">
        <BinaryExpression Operator="MatchAny" Disabled="false">
          <Left>
            <FieldExpression Field="CanBeImpersonatedBy" />
          </Left>
          <Right>
            <MacroExpression Lookup="Dynamicweb.UserManagement.Context:ImpersonatorUserID" />
          </Right>
        </BinaryExpression>
        <BinaryExpression Operator="MatchAny" Disabled="false">
          <Left>
            <FieldExpression Field="CanBeImpersonatedBy" />
          </Left>
          <Right>
            <MacroExpression Lookup="Dynamicweb.UserManagement.Context:ImpersonatorUserAncestorGroups" />
          </Right>
        </BinaryExpression>
      </GroupExpression>
    </GroupExpression>
  </Expressions>
  <ViewFields />
  <ViewLanguages />
  <Meta />
  <ListViewFields />
  <CompletionRules />
  <CompletionLanguages />
</Query>
