Skip to content

Kirby 5.0.4

$user->changeStorage()

Moves or copies the model to a new storage instance/type

$user->changeStorage() has been marked as unstable. It might be changed in a future Kirby major or minor release without being considered a breaking change. Use with caution.

$user->changeStorage(Kirby\Content\Storage|string $toStorage, bool $copy = false): Kirby\Cms\User

Parameters

Name Type Default
$toStoragerequired Kirby\Content\Storageorstring no default value
$copy bool false

Return type

Kirby\Cms\User

This method does not modify the existing $user object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Cms\User inherited from Kirby\Cms\ModelWithContent