Skip to main content
Version: Any 26

Users

GQL queries users as well as contents. The users table then replaces the content type, and the query returns user records.

select * from users where user.country='France' order by user.name asc

The syntax remains the one of content queries: predicates, logical operators, parentheses and ORDER BY. The technical users, such as the system user and the RSS agent, are excluded from the results.

These queries notably feed the data lists that offer users as values.

Metadata​

The queryable fields are the metadata of the user aspect, designated by the user. prefix.

MetadataContent
user.loginLogin name
user.nameFull name
user.emailEmail address
user.first_nameFirst name
user.last_nameLast name
user.phone_numberPhone number
user.countryCountry
user.is_disabledDisabled user, boolean
user.is_password_expiredExpired password, boolean

The metadata added to the "User" aspect in the Aspects module are queried under the same prefix.

select * from users where user.is_disabled=false and user.email like '*@company.com'

Membership​

The membership fields start with _membership and find the users members of a group.

select * from users where _membership.all_groups='group01'
FieldCondition
_membership.groupsReferences the groups the user is directly a member of. Can be used with the = or <> operator. For instance: _membership.groups='group01'
_membership.all_groupsReferences the groups the user is a member of, directly or by inheritance through the nested groups. Can be used with the = or <> operator. For instance: _membership.all_groups='group01'