Function __global->find_usergroup_id

Definitions

sources/cns_groups.php

  • Get the ID for a usergroup if we only know the title. Warning: Only use this with custom code, never core code! It assumes a single language and that usergroups aren't renamed.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$title SHORT_TEXT No No required parameter N/A N/A The title

Returns

  • The ID (null: could not find)
  • Type: ?AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the ID for a usergroup if we only know the title. Warning: Only use this with custom code, never core code! It assumes a single language and that usergroups aren't renamed.
 *
 * @param  SHORT_TEXT $title The title
 * @return ?AUTO_LINK The ID (null: could not find)
 */

function find_usergroup_id(string $title) : ?int