Closed j-greig closed 4 years ago
Yeah, I was just about to point out you can use a multi-environment config setup for this. In fact, its shown in the readme.
I'm also hesitant about using CRAFT_ENVIRONMENT == 'dev'
because that's just not reliable enough. For instance, our team actually uses local
as our environment variable - call it just being old-school from our Craft 2 ways. But its valid, because you might have several other instances of "dev".
This is what happens when I try to make decisions before 7am 🤪
Appreciate the PR though - I don't want to rain on your parade 😵
No worries! I might try building the opposite feature of this (which I'd also find super handy) which is autologin if environment == dev/local/whatever
Any reason the enable/disable per environment isn't a good fit?
EDIT: build this and then realised it's doable via one line in the "config/knock-knock.php" file, d'oh! So feel free to ignore this if it wouldn't be a helpful addition, just wanted to practice my plugin dev really :)
To give people the option to skip the Knock Knock prompt when developing locally.
Handy because pulling down a copy of the Craft database from staging or elsewhere logs you out of the CP and means the next thing you see is Knock Knock.