User Type Query

The User Type Query supports all Active Query operations plus the following:

Params

All of the standard Active Query public properties are available plus the following:

PropertyTypeDescription
handlestring, string[], nullThe handle that the resulting user type(s) must have
userstring, string[], integer, integer[], User, User[], nullThe user(s) that the resulting user type(s) must be associated to
idinteger, integer[], nullThe id that the resulting user type(s) must have
namestring, string[], nullThe name that the resulting user type(s) must have
uidstring, string[], nullThe uid that the resulting user type(s) must have
dateCreatedstring, array, DateTime, nullThe creation date that the resulting user type(s) must have
dateUpdatedstring, array, DateTime, nullThe updated date that the resulting user type(s) must have

Chain Setting

All of the params above can be accessed and chained together. The methods are named the same as the property.

Here is an example:

{% set query = craft.organizations.userTypes.getQuery() %}
{% do query.handle('foo').name('Bar') %}