Sometimes you're stuck in a perfect storm of an error loop (like if your file permissions are wrong and your didn't configure your email provider correctly) and just need to reset a user's password by any means necessary.
These are those means.
- Find the user you're looking for the
users
directory — they're organized by email address. - Open the appropriate YAML file.
- Delete the
password_hash
variable. - Add a new
password
variable set to whatever you want your password to be — temporary or otherwise. - Visit any URL on the site and Statamic will spot that unencrypted password and hash it for you.
- Now you can log in.
Example for the sake of clarity
Before, while you have no idea what the password is:
name: 'Mrs. Buttersworth'super: trueid: ca095f7c-8870-4dba-bc97-8f5a43953920password_hash: $2y$10$Sou9pAY.BXgz6xdWwji8wOdCdYo2GppvPOHBp8TEp074aQOtYl8AS
After Step 4:
name: 'Mrs. Buttersworth'super: trueid: ca095f7c-8870-4dba-bc97-8f5a43953920password: moresyruppleaseplzandthankyou!
After Step 5:
name: 'Mrs. Buttersworth'super: trueid: ca095f7c-8870-4dba-bc97-8f5a43953920password_hash: $2y$10$Vopn8T7e.EMVEjxdP5p.g.AU5GTTN4RklvgR2l0dTwSPeJal91v/q