Skip Navigation

[Resolved] How to use forgot password and reset password shortcodes?

This support ticket is created 2 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by himanshuS 2 years, 12 months ago.

Assisted by: Waqar.

Author
Posts
#2006565

I am trying to use the forgot password and reset password shortcodes but there is something off with the setup that makes it difficult to use the forms.

I am using the forgot password form like this on a "forgot-password page"

[wpv-forgot-password-form redirect_url='<em><u>hidden link</u></em>' redirect_url_fail='<em><u>hidden link</u></em>;

This was the user is redirected to a page where they are prompted to check their email on success. Users also receive an error message on the same page when the validation fails.

I have another page called "reset-password" and there I am using this:

[wpv-reset-password-form redirect_url='<em><u>hidden link</u></em>;

Once the user adds the new password they are redirected to a confirmation page that says password reset and asks the user to login.

What is the problem?
The forgot password page redirects the user to the right confirmation page but the email received is a generic email from WordPress.

Link: hidden link
When I click on the link it takes me to WordPress password reset instead of my own reset password page.

What am I missing here and does the user even receive an email to reset the password with toolset forgot password shortcode? How does this shortcode match with reset-password shortcode i.e. how does the reset password shortcode know which user's details have to be changed?

#2007173

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

The password reset email link, in this case, is using the WordPress' default reset password link, because, in your "wpv-forgot-password-form" shortcode, a link for the custom reset password page is not provided through the "reset_password_url" attribute:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-forgot-password-form

Assuming that your custom reset password page is at /reset-password/, it will look like this:


[wpv-forgot-password-form redirect_url='<em><u>hidden link</u></em>' redirect_url_fail='<em><u>hidden link</u></em>' reset_password_url="<em><u>hidden link</u></em>"]

As a result, the forgot password reset email that the user will receive, will have a link to the custom reset password page and not WordPress's default one.

And just as the default password reset link, a special URL parameter "key" attribute will be added in the link, which will help in identifying which user's password needs to be reset.

regards,
Waqar

#2007523

It worked like a charm. Thanks, Waqar!

#2007525

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.