Users

The Kirby Panel has a simple user management section, which makes it possible to add any number of Panel users and edit their account data.

Creating a new user

Open the menu and click on "Users". You will find the "Add a new user" button in the top right corner, which will take you to a fresh user form. Fill in all required information and hit add to create a new user.

Editing a user

On the "Users" page click on the username or the pencil icon to get to the edit form for the user. Fill in all required information and hit "Save" to update the user information. Only fill in the password fields if you want to change the password for the user.

Uploading a profile picture

On the "Users" page either click directly on the little profile picture in the list or click on the username and then on "Upload profile picture" to open the upload dialog.

Allowed profile picture formats

The uploader only accepts JPG, PNG and GIF files for profile pictures. A square picture will give the best results. Otherwise the uploader will crop the profile picture from the center.

2.2.3 +

Custom user form fields

You can create custom fields for the user management section on a per role basis by defining a user blueprint. Those form fields can be added by creating blueprints for user roles in site/blueprints/users. For example:

# site/blueprints/users/admin.yml
fields:
  twitter:
    label: Twitter
    type: text
    placeholder: @username
    icon: twitter
    width: 1/2
  github:
    label: Github
    type: text
    placeholder: Github username
    icon: github
    width: 1/2

You can easily access your new custom fields in your templates:

<?= $site->user('peter')->twitter() ?>

Note: Custom user fields are only editable once a user has been created because you need to have the user object first.

2.4.0 +

Default user form fields

Since Kirby 2.4.0, you can define a default user blueprint in site/blueprints/users/default.yml, which will be used if no role-specific blueprint has been defined.

Users API

You can find out more about Kirby's user API on the cheat sheet.