Skip to content

Kirby 6.0.0

$users->update()

Updates an object in the collection

$users->update(string|User $key, User|null $object = null): Users

Parameters

Name Type Default Description
$keyrequired stringorKirby\Cms\User no default value Key or object to update
$object Kirby\Cms\Userornull null New object for the key

Return type

Kirby\Cms\Users

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

Parent class

Kirby\Cms\Users inherited from Kirby\Cms\Collection