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
$open_membership BINARY No No 0 N/A N/A Whether members may join this usergroup without requiring any special permission
$is_private_club BINARY No No 0 N/A N/A Whether this usergroup is a private club. Private clubs may be managed in the CMS zone, and do not have any special permissions - except over their own associated forum.
$uniqify boolean No No False N/A N/A Whether to force the title as unique, if there's a conflict
$comes_with_permissions boolean No No True N/A N/A Whether permissions should be auto-copied

Returns

  • The ID of the new usergroup
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Add a usergroup.
 *
 * @param  BINARY $open_membership Whether members may join this usergroup without requiring any special permission
 * @param  BINARY $is_private_club Whether this usergroup is a private club. Private clubs may be managed in the CMS zone, and do not have any special permissions - except over their own associated forum.
 * @param  boolean $uniqify Whether to force the title as unique, if there's a conflict
 * @param  boolean $comes_with_permissions Whether permissions should be auto-copied
 * @return AUTO_LINK The ID of the new usergroup
 */

function cns_make_group(int $open_membership = 0, int $is_private_club = 0, bool $uniqify = false, bool $comes_with_permissions = true) : int