I have a system in which I create users by Email ID when they make a purchase.
I want to send them the link to send Password when they click on link so the option is I initiate the password reset procedure in the code and I can make a URL to initiate the procedure, so the user will receive the URL with
http://myurl.com/my-account/lost-password/?key=U7EJyOI2o84ylp99DuoU&[email protected]
I tried to generate password reset key by this:
get_password_reset_key('[email protected]');
but when I append that key in URL, wordpress says Invalid key
I think I'm missing something here in my code flow that is probably associating that key to the user so when user clicks that key key must look valid to wordpress.
In short I want to clear the phase where wordpress generates reset key for user and that key must be valid when I check it by URL so password reset can be done.
Please help me here.