Skip to content

Kirby 3.6.6

$users->add()

Adds a single user or an entire second collection to the current collection

$users->add(\Kirby\Cms\Users|\Kirby\Cms\User|string $object): Kirby\Cms\Users

Parameters

Name Type Default
$object * Kirby\Cms\Users|Kirby\Cms\User|string

Return type

Kirby\Cms\Users

This method modifies the existing $users object it is applied to and returns it again.

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException When no User or Users object or an ID of an existing user is passed

Parent class

Kirby\Cms\Users