Primary

Actions

The Groups API provides the following actions.

Administrative Back End

groups_admin_menu

This action is invoked after the pages of the Groups menu have been registered.

Parameters

$pages array registered pages

groups_network_admin_menu

This action is invoked after the pages of the Groups network admin menu have been registered.

Parameters

$pages array registered pages

Capabilities

groups_created_capability

This action is invoked after a Groups capability has been created.

Parameters

$capability_id int the ID of the Groups capability that has been created

groups_updated_capability

This action is invoked after a Groups capability has been updated.

Parameters

$capability_id int the ID of the updated capability

groups_deleted_capability

This action is invoked after a Groups capability has been deleted.

Parameters

$capability_id int the ID of the capability that has been deleted

Notes: No additional details about the capability can be retrieved at this point, as the related data has already been removed. An improvement to consider for this action would be to pass details about the deleted capability as a second parameter, for example containing the row data for the deleted capability.

Group-Capability Relations

groups_created_group_capability

This action is invoked after a group and a capability have been related. The relationship establishes that the group and its members possess the capability.

Parameters

$group_id int the ID of the group
$capability_id in the ID of the capability

groups_updated_group_capability

This action is invoked when the relationship is updated. Note that currently no changes in the relationship can be recorded.

Parameters

$group_id int the ID of the group
$capability_id in the ID of the capability

groups_deleted_group_capability

This action indicates the termination of a group-capability relationship.

Parameters

$group_id int the ID of the group
$capability_id in the ID of the capability

Groups

groups_created_group

This action is invoked after a new group has been created.

Parameters

$group_id int the ID of the group

groups_updated_group

This action is invoked after a group has been updated.

Parameters

$group_id int the ID of the group

groups_deleted_group

This action is invoked after a group has been deleted.

Parameters

$group_id int the ID of the group

Note: As with deleted capabilities, it should be considered to enhance this action with a second parameter, indicating details about the group, as it is impossible to retrieve these at this point.

User-Capability Relations

groups_created_user_capability

Invoked after a user and a Groups capability are related.

Parameters

$user_id int user ID
$capability_id int capability ID

groups_updated_user_capability

Invoked after the relationship between a user and a Groups capability has been updated. Note that currently no changes in the relationship can be recorded.

Parameters

$user_id int user ID
$capability_id int capability ID

groups_deleted_user_capability

This action is invoked after the relation between a user and a Groups capability has been terminated.

Parameters

$user_id int user ID
$capability_id int capability ID

User-Group Relations

groups_created_user_group

This action is invoked after the user has become a member of a group.

Parameters

$user_id int user ID
$group_id int group ID

groups_updated_user_group

This is invoked after the relationship between a user and a group has been updated. Note that currently no changes in the relationship can be recorded.

Parameters

$user_id int user ID
$group_id int group ID

groups_deleted_user_group

This action is invoked after a user has been removed from a group.

Parameters

$user_id int user ID
$group_id int group ID