Function __global->cns_get_all_default_groups

Definitions

sources/cns_groups.php

  • Get a list of the default usergroups (the usergroups a member is put in when they join).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$include_primary boolean No No False N/A N/A Whether to include the default primary (at the end of the list)
$include_all_configured_default_groups boolean No No False N/A N/A The functionality does not usually consider configured default groups [unless there's just one], because this is a layer of uncertainty (the user PICKS one of these). If you want to return all configured default groups, set this parameter to true.

Returns

  • The list of default IDs
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get a list of the default usergroups (the usergroups a member is put in when they join).
 *
 * @param  boolean $include_primary Whether to include the default primary (at the end of the list)
 * @param  boolean $include_all_configured_default_groups The functionality does not usually consider configured default groups [unless there's just one], because this is a layer of uncertainty (the user PICKS one of these). If you want to return all configured default groups, set this parameter to true.
 * @return array The list of default IDs
 */

function cns_get_all_default_groups(bool $include_primary = false, bool $include_all_configured_default_groups = false) : array