m_group
Information about user groups.
The m_group model gives access to group settings and group memberships.
The group settings are a simple property list. For example the settings of the admin group which is returned by“m.group[group_id]” are:
[{id,204},
{is_admin,true},
{is_supervisor,true},
{is_community_publisher,true},
{is_public_publisher,true}]
All other m_group properties are accessed like: m.group.members[group_id]
The following m_group model properties are available in templates:
| Property | Description | Example value |
| members | List of a group’s member ids. | [1] |
leaders | List of a group’s leader ids. | [679, 1042] |
| observers | List of a group’s oberver ids. | [8921] |
| roles | Roles the given user has. Returns a property list with role names as keys. The available roles are: admin, supervisor, community_publisher and public_publisher. Used as m.group.roles[user_id] | [admin,supervisor] |
This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.