Function Module_groups->add_to

Definitions

site/pages/modules/groups.php

  • The actualiser to add a member to a usergroup.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$special_permission boolean No No False N/A N/A Whether to skip checking permission for usergroup control
$username ?string No No Null N/A N/A Username to add (null: read from environment)

Returns

  • The UI
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * The actualiser to add a member to a usergroup.
 *
 * @param  boolean $special_permission Whether to skip checking permission for usergroup control
 * @param  ?string $username Username to add (null: read from environment)
 * @return Tempcode The UI
 */

public function add_to(bool $special_permission = false, ?string $username = null) : object