I’m trying to create a way for users to reset the password using a link mailed to them.
The link looks like this:
lametoken is randomly generated and stored in the database before sending the mail.
I have created a route like this:
$routes->connect('/reset-password/*',['controller' => 'Users', 'action' => 'reset_password', 'reset-password']) ->setPass(['token']);
But now I need to redirect the user to the same link again in case of an error.
I’m trying to do this like this:
This, however, leads to the url becoming this:
How can I make it so that this
?token=reset-password get’s removed?