Skip to content



Takes an array of user props and creates a nice and clean user collection from it

Users::factory(array $users, array $inject = [ ]): Kirby\Cms\Users


Name Type Default
$users * array
$inject array [ ]

The $users parameter is an array of Kirby\Cms\User objects or an array of arrays, where each array contains the properties to create a Kirby\Cms\User object. Pass the following data for each user:

Name Type Description
blueprint array Sets the Blueprint object
content array Sets the Content object
email string Sets the user email
files array Sets the Files collection
id string Sets the user id
language string Sets the user language
name string Sets the user name
password string Sets the user's password hash
role string Sets the user role
translations array Create the translations collection from an array

Return type


Parent class