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