$user->version()
Returns a content version instance
$user->version(Kirby\Content\VersionId|string|null $versionId = null): Kirby\Content\Version
Parameters
| Name | Type | Default |
|---|---|---|
| $versionId | Kirby\Content\VersionIdorstringornull |
null
|
Return type
This method modifies the existing $user object it is applied to and returns it again.
Parent class
Kirby\Cms\User
inherited from Kirby\Cms\ModelWithContent
Examples
// get the latest saved content of a user
$$user->version('latest');
// get all unsaved changes
$$user->version('changes');