Function __global->cns_update_group_approvals
Definitions
sources/cns_groups_action2.php
- Call this after making changes to a member's usergroups to update approval records.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: void
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | The member whose usergroups we are checking |
| $status_member_id | ?MEMBER | No | No | Null | N/A | N/A | The member who made the changes to the usergroups (null: the system) |
| $groups_to_check | array | No | No | [] | N/A | N/A | Array of usergroups that the member could possibly have been removed from (e.g. all the groups they belonged in before changes were made, or the explicit groups from which they were removed) |
Preview
Code (PHP)
/**
* Call this after making changes to a member's usergroups to update approval records.
*
* @param MEMBER $member_id The member whose usergroups we are checking
* @param ?MEMBER $status_member_id The member who made the changes to the usergroups (null: the system)
* @param array $groups_to_check Array of usergroups that the member could possibly have been removed from (e.g. all the groups they belonged in before changes were made, or the explicit groups from which they were removed)
*/
function cns_update_group_approvals(int $member_id, ?int $status_member_id = null, array $groups_to_check = []) : void
* Call this after making changes to a member's usergroups to update approval records.
*
* @param MEMBER $member_id The member whose usergroups we are checking
* @param ?MEMBER $status_member_id The member who made the changes to the usergroups (null: the system)
* @param array $groups_to_check Array of usergroups that the member could possibly have been removed from (e.g. all the groups they belonged in before changes were made, or the explicit groups from which they were removed)
*/
function cns_update_group_approvals(int $member_id, ?int $status_member_id = null, array $groups_to_check = []) : void
