User accounts are represented by YAML files in the
users/ directory, named according to their email address. The YAML contents must have a password and role of some kind inside to be able to log into the control panel. The simplest role is a Super User.
You can also create users via the command line. It's even easier than this.
Walkthrough: Creating a new Super User
- Create a file called
<[email protected]>. Make sure to use a real email address otherwise that reset password feature won't do a darn thing.
- Inside the YAML file add
password: anything_you_want, where
anything_you_wantis literally anything you want as a password.
- Visit any URL on the site and Statamic will spot that unencrypted password and hash/securify it for you.
- Now you can log in with
anything_you_want, or the thing you really wanted.
Before being securified:
super: truepassword: anything_you_want
super: truepassword_hash: $2y$10$Vopn8T7e.EMVEjxdP5p.g.AU5GTTN4RklvgR2l0dTwSPeJal91v/q
Assigning Non-Super Roles
If you've created roles with limited permissions, you can assign those to your user's YAML file in an array:
roles:- editor- publisher