Adding Groups
When adding a group, there is only one required field: name. However, you do have a few other options.
| Attribute | Example | Description |
|---|---|---|
| name | Example Group | Name of the group. |
| description | This is an example group | Description of the group. |
| roles | array('example_role_1', 'example_role_2') | Array of roles slugs to be given to this group. |
| members | array(1, 4, 15) | Array of user_ids for users who are members of this group. |
$this->bitauth->add_group($data)
$group = array(
'name' => 'Example Group',
'description' => 'This is an example group.',
'roles' => array('example_role_1', 'example_role_2'),
'members' => array(1, 4, 15)
);
$this->bitauth->add_group($group);
For information on assigning roles, see Setting Roles.
For information on adding users to a group, see Adding Members.