WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 10 months ago

#37522 assigned feature request

reset password and lost password form functions

Reported by: mireillesan Owned by: voldemortensen
Milestone: Future Release Priority: normal
Severity: normal Version: 4.5.3
Component: Login and Registration Keywords: has-patch
Focuses: Cc:

Description

Wordpress provides the wp_login_form function that can be placed anywhere on our wordpress site through shortcodes, etc. But I couldn't find a function for the reset password and lost password form.

Would it be possible to create those functions as part of Wordpress itself? I'd like to avoid copying code from the wp core files (wp-login) into my own code. I prefer to use Wordpress built-in functions as much as possible.

Attachments (2)

37522.diff (4.2 KB) - added by voldemortensen 20 months ago.
Implements wp_lostpassword_form
37522.2.diff (4.2 KB) - added by desrosj 10 months ago.
Refreshed since tag in documentation.

Download all attachments as: .zip

Change History (18)

#1 @mireillesan
2 years ago

Any news on this?

#2 @mireillesan
2 years ago

  • Type changed from enhancement to feature request

#3 @voldemortensen
20 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.8
  • Owner set to voldemortensen
  • Status changed from new to assigned

Thanks for the idea @mireillesan! I like the idea of a wp_lostpassword_form, but wp_resetpass_form might not be such a good idea, or even practical. For wp_resetpass_form to be functional, a password reset key needs to be in place somehow.

@voldemortensen
20 months ago

Implements wp_lostpassword_form

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


15 months ago

#5 @jbpaul17
15 months ago

  • Keywords needs-testing added

Ideally this gets committer review before landing in 4.8.

This ticket was mentioned in Slack in #core by voldemortensen. View the logs.


15 months ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


15 months ago

This ticket was mentioned in Slack in #core by voldemortensen. View the logs.


15 months ago

#9 @ocean90
14 months ago

  • Milestone changed from 4.8 to Future Release

Moving to future since this missed the beta 1.

#10 @voldemortensen
14 months ago

  • Milestone changed from Future Release to 4.9

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


10 months ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


10 months ago

@desrosj
10 months ago

Refreshed since tag in documentation.

#13 @desrosj
10 months ago

The initial patch looks good to me and worked as expected.

Should the form on wp-login.php be switched to use the function?

#14 @voldemortensen
10 months ago

  • Keywords commit added; needs-testing removed

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


10 months ago

#16 @SergeyBiryukov
10 months ago

  • Keywords commit removed
  • Milestone changed from 4.9 to Future Release

Tested 37522.2.diff by adding the form to a sidebar in Twenty Seventeen.

The form correctly redirects to wp-login.php and displays an error for invalid login, but doesn't display any messages for a valid login, just reloads the page. I thought it didn't work until I checked the email.

Additionally, login_form_bottom should be replaced with lostpassword_form_bottom.

Moving to a Future Release per the 4.9 bug scrub earlier today.

Last edited 10 months ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.