07-09-2018, 08:15 AM
I'm working on some code to reset a password. The user can send an email to himself:
"Dear rich,
Recently a request was submitted to reset a password for your account. If this was a mistake, just ignore this email and nothing will happen (the request will expire in 24 hours).
To reset your password, visit the following link: localhost/application/views/users/resetPassword.php?fp_code=74c9e4b9e40339299b32ef7a7206eae5
Regards,
R&D Substantiator"
The problem is that when the user goes into their email and clicks on the link above, they get a 403 error. I was able to get around this by placing the resetPassword.php file in my document root. But I don't think that this is a good solution because the resetPassword.php file needs to a) open the database b) check that the fp_code is good c) update the password. All of these need to be done within my application directory (I think). My question is:
Where do I locate the restPassword file so it can be accessed by a remote user. Note: I will also need to put this whole thing up on my hoster's server where localhost won't work. This might be a 2nd question?
"Dear rich,
Recently a request was submitted to reset a password for your account. If this was a mistake, just ignore this email and nothing will happen (the request will expire in 24 hours).
To reset your password, visit the following link: localhost/application/views/users/resetPassword.php?fp_code=74c9e4b9e40339299b32ef7a7206eae5
Regards,
R&D Substantiator"
The problem is that when the user goes into their email and clicks on the link above, they get a 403 error. I was able to get around this by placing the resetPassword.php file in my document root. But I don't think that this is a good solution because the resetPassword.php file needs to a) open the database b) check that the fp_code is good c) update the password. All of these need to be done within my application directory (I think). My question is:
Where do I locate the restPassword file so it can be accessed by a remote user. Note: I will also need to put this whole thing up on my hoster's server where localhost won't work. This might be a 2nd question?
proof that an old dog can learn new tricks