processwire-recipes / Recipes

Recipe Markdown files
29 stars 18 forks source link

Clarify example #23

Closed mindplay-dk closed 9 years ago

mindplay-dk commented 9 years ago

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.

marcus-herrmann commented 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!

owzim commented 9 years ago

@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

mindplay-dk commented 9 years ago

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 :-)