Function __global->cns_make_group
Definitions
sources/cns_groups_action.php
- Add a usergroup.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $name | SHORT_TEXT | No | No | required parameter | N/A | N/A | The name of the usergroup |
| $is_default | BINARY | No | No | 0 | N/A | N/A | Whether members are automatically put into the when they join |
| $is_super_admin | BINARY | No | No | 0 | N/A | N/A | Whether members of this usergroup are all super-administrators |
| $is_super_moderator | BINARY | No | No | 0 | N/A | N/A | Whether members of this usergroup are all super-moderators |
| $title | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | The title for primary members of this usergroup that don't have their own title |
| $rank_image | URLPATH | No | No | Blank (empty string) | N/A | N/A | The rank image for this |
| $promotion_target | ?GROUP | No | No | Null | N/A | N/A | The that members of this usergroup get promoted to at point threshold (null: no promotion prospects) |
| $promotion_threshold | ?integer | No | No | Null | N/A | N/A | The point threshold for promotion (null: no promotion prospects) |
| $promotion_approval | BINARY | No | No | 0 | N/A | N/A | Whether usergroup promotion should require manual approval |
| $group_leader | ?MEMBER | No | No | Null | N/A | N/A | The leader of this usergroup (null: none) |
| $flood_control_submit_secs | ?integer | No | No | Null | N/A | N/A | The number of seconds that members of this usergroup must endure between submits (group 'best of' applies). 0 means N/A. (null: average for existing usergroups) |
| $flood_control_access_secs | ?integer | No | No | Null | N/A | N/A | The number of seconds that members of this usergroup must endure between accesses (group 'best of' applies). 0 means N/A. (null: average for existing usergroups) |
| $max_daily_upload_mb | ?integer | No | No | Null | N/A | N/A | The number of megabytes that members of this usergroup may attach per day (group 'best of' applies). (null: average for existing usergroups) |
| $max_attachments_per_post | ?integer | No | No | Null | N/A | N/A | The number of attachments that members of this usergroup may attach to something (group 'best of' applies). (null: average for existing usergroups) |
| $max_avatar_width | ?integer | No | No | Null | N/A | N/A | The maximum avatar width that members of this usergroup may have (group 'best of' applies). (null: average for existing usergroups) |
| $max_avatar_height | ?integer | No | No | Null | N/A | N/A | The maximum avatar height that members of this usergroup may have (group 'best of' applies). (null: average for existing usergroups) |
| $max_post_length_comcode | ?integer | No | No | Null | N/A | N/A | The maximum post length that members of this usergroup may make (group 'best of' applies). (null: average for existing usergroups) |
| $max_sig_length_comcode | ?integer | No | No | Null | N/A | N/A | The maximum signature length that members of this usergroup may make (group 'best of' applies). (null: average for existing usergroups) |
| $gift_points_base | ?integer | No | No | Null | N/A | N/A | The number of gift points that members of this usergroup start with (group 'best of' applies). (null: average for existing usergroups) |
| $gift_points_per_day | ?integer | No | No | Null | N/A | N/A | The number of gift points that members of this usergroup get per day (group 'best of' applies). (null: average for existing usergroups) |
| $enquire_on_new_ips | BINARY | No | No | 0 | N/A | N/A | Whether e-mail confirmation is needed for new IP addresses seen for any member of this usergroup (group 'best of' applies) |
| $is_presented_at_install | BINARY | No | No | 0 | N/A | N/A | Whether the usergroup is presented for joining at joining (implies anyone may be in the, but only choosable at joining) |
| $hidden | BINARY | No | No | 0 | N/A | N/A | Whether the name and membership of the is hidden |
| $order | ?integer | No | No | Null | N/A | N/A | The display order this will be given, relative to other usergroups. Lower numbered usergroups display before higher numbered usergroups (null: next). |
| $rank_image_pri_only | BINARY | No | No | 1 | N/A | N/A | Whether the rank image will not be shown for secondary membership |
Returns
- The ID of the new usergroup
- Type: AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Add a usergroup.
*
* @param SHORT_TEXT $name The name of the usergroup
* @param BINARY $is_default Whether members are automatically put into the when they join
* @param BINARY $is_super_admin Whether members of this usergroup are all super-administrators
* @param BINARY $is_super_moderator Whether members of this usergroup are all super-moderators
* @param SHORT_TEXT $title The title for primary members of this usergroup that don't have their own title
* @param URLPATH $rank_image The rank image for this
* @param ?GROUP $promotion_target The that members of this usergroup get promoted to at point threshold (null: no promotion prospects)
* @param ?integer $promotion_threshold The point threshold for promotion (null: no promotion prospects)
* @param BINARY $promotion_approval Whether usergroup promotion should require manual approval
* @param ?MEMBER $group_leader The leader of this usergroup (null: none)
* @param ?integer $flood_control_submit_secs The number of seconds that members of this usergroup must endure between submits (group 'best of' applies). 0 means N/A. (null: average for existing usergroups)
* @param ?integer $flood_control_access_secs The number of seconds that members of this usergroup must endure between accesses (group 'best of' applies). 0 means N/A. (null: average for existing usergroups)
* @param ?integer $max_daily_upload_mb The number of megabytes that members of this usergroup may attach per day (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_attachments_per_post The number of attachments that members of this usergroup may attach to something (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_avatar_width The maximum avatar width that members of this usergroup may have (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_avatar_height The maximum avatar height that members of this usergroup may have (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_post_length_comcode The maximum post length that members of this usergroup may make (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_sig_length_comcode The maximum signature length that members of this usergroup may make (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $gift_points_base The number of gift points that members of this usergroup start with (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $gift_points_per_day The number of gift points that members of this usergroup get per day (group 'best of' applies). (null: average for existing usergroups)
* @param BINARY $enquire_on_new_ips Whether e-mail confirmation is needed for new IP addresses seen for any member of this usergroup (group 'best of' applies)
* @param BINARY $is_presented_at_install Whether the usergroup is presented for joining at joining (implies anyone may be in the, but only choosable at joining)
* @param BINARY $hidden Whether the name and membership of the is hidden
* @param ?integer $order The display order this will be given, relative to other usergroups. Lower numbered usergroups display before higher numbered usergroups (null: next).
* @param BINARY $rank_image_pri_only Whether the rank image will not be shown for secondary membership
* @return AUTO_LINK The ID of the new usergroup
*/
function cns_make_group(string $name, int $is_default = 0, int $is_super_admin = 0, int $is_super_moderator = 0, string $title = '', string $rank_image = '', ?int $promotion_target = null, ?int $promotion_threshold = null, int $promotion_approval = 0, ?int $group_leader = null, ?int $flood_control_submit_secs = null, ?int $flood_control_access_secs = null, ?int $max_daily_upload_mb = null, ?int $max_attachments_per_post = null, ?int $max_avatar_width = null, ?int $max_avatar_height = null, ?int $max_post_length_comcode = null, ?int $max_sig_length_comcode = null, ?int $gift_points_base = null, ?int $gift_points_per_day = null, int $enquire_on_new_ips = 0, int $is_presented_at_install = 0, int $hidden = 0, ?int $order = null, int $rank_image_pri_only = 1) : int
* Add a usergroup.
*
* @param SHORT_TEXT $name The name of the usergroup
* @param BINARY $is_default Whether members are automatically put into the when they join
* @param BINARY $is_super_admin Whether members of this usergroup are all super-administrators
* @param BINARY $is_super_moderator Whether members of this usergroup are all super-moderators
* @param SHORT_TEXT $title The title for primary members of this usergroup that don't have their own title
* @param URLPATH $rank_image The rank image for this
* @param ?GROUP $promotion_target The that members of this usergroup get promoted to at point threshold (null: no promotion prospects)
* @param ?integer $promotion_threshold The point threshold for promotion (null: no promotion prospects)
* @param BINARY $promotion_approval Whether usergroup promotion should require manual approval
* @param ?MEMBER $group_leader The leader of this usergroup (null: none)
* @param ?integer $flood_control_submit_secs The number of seconds that members of this usergroup must endure between submits (group 'best of' applies). 0 means N/A. (null: average for existing usergroups)
* @param ?integer $flood_control_access_secs The number of seconds that members of this usergroup must endure between accesses (group 'best of' applies). 0 means N/A. (null: average for existing usergroups)
* @param ?integer $max_daily_upload_mb The number of megabytes that members of this usergroup may attach per day (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_attachments_per_post The number of attachments that members of this usergroup may attach to something (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_avatar_width The maximum avatar width that members of this usergroup may have (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_avatar_height The maximum avatar height that members of this usergroup may have (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_post_length_comcode The maximum post length that members of this usergroup may make (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $max_sig_length_comcode The maximum signature length that members of this usergroup may make (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $gift_points_base The number of gift points that members of this usergroup start with (group 'best of' applies). (null: average for existing usergroups)
* @param ?integer $gift_points_per_day The number of gift points that members of this usergroup get per day (group 'best of' applies). (null: average for existing usergroups)
* @param BINARY $enquire_on_new_ips Whether e-mail confirmation is needed for new IP addresses seen for any member of this usergroup (group 'best of' applies)
* @param BINARY $is_presented_at_install Whether the usergroup is presented for joining at joining (implies anyone may be in the, but only choosable at joining)
* @param BINARY $hidden Whether the name and membership of the is hidden
* @param ?integer $order The display order this will be given, relative to other usergroups. Lower numbered usergroups display before higher numbered usergroups (null: next).
* @param BINARY $rank_image_pri_only Whether the rank image will not be shown for secondary membership
* @return AUTO_LINK The ID of the new usergroup
*/
function cns_make_group(string $name, int $is_default = 0, int $is_super_admin = 0, int $is_super_moderator = 0, string $title = '', string $rank_image = '', ?int $promotion_target = null, ?int $promotion_threshold = null, int $promotion_approval = 0, ?int $group_leader = null, ?int $flood_control_submit_secs = null, ?int $flood_control_access_secs = null, ?int $max_daily_upload_mb = null, ?int $max_attachments_per_post = null, ?int $max_avatar_width = null, ?int $max_avatar_height = null, ?int $max_post_length_comcode = null, ?int $max_sig_length_comcode = null, ?int $gift_points_base = null, ?int $gift_points_per_day = null, int $enquire_on_new_ips = 0, int $is_presented_at_install = 0, int $hidden = 0, ?int $order = null, int $rank_image_pri_only = 1) : int
