---
title: "Class UserQueryFilter"
slug: "sdk--stylelabs.m.base.querying.filters.userqueryfilter"
abstract: ""
---
# Class UserQueryFilter

Base class for queries on user fields.

## Inheritance

object

[QueryFilter](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.queryfilter.html)

UserQueryFilter

[CreatedByQueryFilter](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.createdbyqueryfilter.html)

[ModifiedByQueryFilter](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.modifiedbyqueryfilter.html)

## Inherited Members

[QueryFilter.Type](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.queryfilter.html)

[QueryFilter.Accept(IFilterVisitor)](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.queryfilter.html)

## Namespace: StylelabsStylelabs.MStylelabs.M.BaseQueryingFilters

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public abstract class UserQueryFilter : QueryFilter
```

## Properties

### Id

Gets or sets id of the user to filter on.

#### Declaration

```csharp
public long? Id { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| long |  |

### Ids

Gets or sets ids of the users to filter on. If multiple values are specified, the filter will combine them using "OR" (essentially an IN-clause).

#### Declaration

```csharp
public IEnumerable<long> Ids { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IEnumerable<>long |  |

### Operator

Gets or sets the operator used to compare the value(s). Must be either [Equals](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.comparisonoperator.html) or [NotEquals](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.comparisonoperator.html).

#### Declaration

```csharp
public ComparisonOperator Operator { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| [ComparisonOperator](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.base.querying.filters.comparisonoperator.html) |  |

### Username

Gets or sets the name of the user to filter on.

#### Declaration

```csharp
public string Username { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### Usernames

Gets or sets the names of the users to filter on. If multiple values are specified, the filter will combine them using "OR" (essentially an IN-clause).

#### Declaration

```csharp
public IEnumerable<string> Usernames { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IEnumerable<>string |  |
