Create a user in Frontend

How to create a user in frontend?

Allow visitors in blueprint to create a user?


Login with “impersonate()” ?

You can either use the Kirby superuser or an existing user to authenticate.

You can find an example of a user signup in this plugin:, check out the signup.php controller and template.

Prior to allowing users to sign up, you should define a role and permissions for these users.

1 Like


$user = $kirby->users()->create(array(
	'email'     => $data['email'],
	'name'      => $username,
	'role'      => 'client',
	'language'  => 'de',
	'password'  => $data['password'],
	'content'   => [
		'firstname' => $data['firstname'],
		'lastname'  => $data['lastname'],
		'active'	=> '0',
		'create'	=> time(),
		'token' 	=> $token,

Why is the “content” not written to the user file?

There’s a bug in multi-language environments:

Oh, ok. Thanks.

This is now fixed in rc 3.1.2