Password Forgotten

Open to all! Ask other shopowners for help.
Post Reply
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Password Forgotten

Post by heatherbell »

When a customer requests Reset My Password on password_forgotten.php, they are sent an email with a URL to reset their password. The URL is in plain text. Some email clients will automatically make this clickable, some don't in which case the customer then needs to copy/paste the URL into their browser.
Occasionally, the customer fails to do this correctly resulting in the message, "Error: The password reset link was not found in our records, please try again by generating a new link." Of course, the customer might give up, never to return, in which case we are then unaware or they contact us. Both are undesirable but we have lived with it for years but we've had 2 contacts from customers yesterday about this so have been motivated to change it so the URL is a clickable link.

This requires a file change.

Change this:
https://github.com/CE-PhoenixCart/Phoen ... en.php#L25
to this:

Code: Select all

const EMAIL_PASSWORD_RESET_BODY = 
  'A new password has been requested for your profile at ' . STORE_NAME . '.' . "\n\n" .
  'Please follow this personal link to securely change your password:' . "\n\n" .
  '<a href="%1$s">%1$s</a>' . "\n\n" .
  'This link will be automatically discarded after 24 hours or after your password has been changed.' . "\n\n" .
  'For help with any of our online services, please e-mail the store-owner: ' . 
  '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . '</a>.' . "\n\n";
That file can be overridden to /templates/ override/includes/languages/english/

Further caveats:
- Configuration > Email Options > Use MIME HTML When Sending Emails needs to be true to send emails using HTML.
- A very few email clients won't render HTML so the URL will still not be clickable.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply