Creating a forgot password function

There’s some discussion of this in here:

https://www.sitepoint.com/community/t/how-to-create-a-proper-reset-password-link-and-user-confirmation-link