Closed mindplay-dk closed 9 years ago
Two PRs on the same recipe within 20min! :) That's cool. I manually committed and merged your and lostkobrakai's input: https://processwire-recipes.com/recipes/resetting-admin-password-via-api/. Thanks for the contribution!
@mindplay-dk that's actually a great idea to put this into a separate php file. When I forget a password for a certain installation, I temporarily put it into the header snippet/chunk/partial. Yours is more useable and portable. Thanks
Wasn't my idea, I saw somebody in the forums using this approach - but yeah, seems like a nice, simple approach, should work for any given situation :-)
Clarified where to put the code - it did not say to put the code in a template file.
The updated code can be put in a flat PHP script in the root of the site - don't need a template.
Removed redundant code in favor of more legible version.