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.
| Metadata | Content |
|---|---|
| user.login | Login name |
| user.name | Full name |
| user.email | Email address |
| user.first_name | First name |
| user.last_name | Last name |
| user.phone_number | Phone number |
| user.country | Country |
| user.is_disabled | Disabled user, boolean |
| user.is_password_expired | Expired 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'
| Field | Condition |
|---|---|
| _membership.groups | References the groups the user is directly a member of. Can be used with the = or <> operator. For instance: _membership.groups='group01' |
| _membership.all_groups | References 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' |