User::create()
Creates a new User from the given props and returns a new User object
User::create(array $props): Kirby\Cms\User
Parameters
Name | Type | Default |
---|---|---|
$propsrequired | array |
no default value |
Return type
Parent class
Examples
$newUser = User::create([
'email' => 'bastian@getkirby.com',
'name' => 'Bastian',
'role' => 'admin',
'language' => 'en',
'password' => 'topSecret',
'content' => [
'mastodon' => 'https://mastodon.social/@getkirby',
'position' => 'founder'
]
]);