Error in reset password link

Hi,

My project generate a link in the email for reset password with this format:
Email template: Reset password

In the email:
site.com:80/ medlemmer/admin/forgotpwd.php?action=reset&user=0989-poul&code=ZZ2YbbIAwR84AikV-hQ…

Note the portnumber of 80 in the link although this is https. If I remove :80 then the link works OK.

How to rectify this ?

tia
/Poul

Port 80 is default, why access the site at “site.com:80”? You may remove the port number in the URL and the link will be correct for both http and https.

That portnumber is added automatically by phpMaker v.2020 in the tag , hence my question how to get rid of it :slight_smile:

Cheers
/Poul

If the site is SSL enabled, the generated url should be like: “h t t p s://…:443/”. For non-SSL the url will be “h t t p://…:80/”. Check the function DomainUrl() in phpfn.php.

Thanks arbei,
The site is definitely SSL, so it seems that function IsHttps() in phpfn.php is returning an incorrect value…

If I hardcode the domainurl() function to always use SSL like this:

return “h t t p s://” . ServerVar(“SERVER_NAME”) . “:4 4 3”;

then it works.

But obviously not the correct way of doing it, since the mod will be gone on each remake of the code.

Any suggestions ?

tia
/Poul

You may use “Email_Sending” server event under “Server Events” → “Other” → “Password Recovery Page” to change the related email content.

Thanks mobhar,

This did it in Email_sending event:
$email->ReplaceContent(“h t t ps://site.com:80/”, “h t t p s://site.com:443/” );

/Poul

When I use the reset password link it sends me back to the login page, the link does have the correct content I think.mysite/resetpassword?action=reset&user=Fons&code=nyJhr_abx54.Which direction am I looking to solve it?thank you

The page does redirect user to the login page for user to login. Do you see success (email sent to user) or failure message (failed to send email) in the login page?

Hello,The mail is sent successfully. The link in the email is also correct. The link leads to the login page and skips the reset password page

When the Reset password link in the email is clicked, then system should redirect end-users to the Change Password page, so they would be able to change their password by themselves.

If it redirects to the Login page, then probably the cause of it you have not enabled Change Password Page, yet, from Security → Advanced → User Login Options. So, make sure you have already enabled it, and re-generate ALL the script files again.

Hello,I have checked te settings, all are correct. Also the link is correct (mysite/resetpassword?action=reset&user=Tom%20en nog wat&code=w2GJzofLZFSscC1TBkaiHg.But the login page opens instead of the reset password page.
Have the feeling that the page is being forwarded. No idea where to look for the solution …

Hello,
Problem is solved. The files from the previous versions were also still on the server. Have this removed, now everything works fine.
thanks for the help