Opened 8 years ago
Closed 7 years ago
#45745 closed enhancement (fixed)
wp_new_user_notification should use get_password_reset_key
| Reported by: | spacedmonkey | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.3 |
| Component: | Users | Version: | 4.4 |
| Severity: | normal | Keywords: | good-first-bug has-patch needs-refresh |
| Cc: | Focuses: |
Description (last modified by )
Since the function get_password_reset_key was introducted in [34923] it means, there is now repeated logic in the function wp_new_user_notification has repeated logic. This should be replaced.
Attachments (2)
Change History (11)
@
8 years ago
I have replaced the repeated logic in wp_new_user_notification for password reset key with get_password_reset_key function.
#5
follow-up:
↓ 6
@
8 years ago
- Keywords has-patch added; needs-patch removed
Thanks for @mrasharirfan the first patch.
The only thing I would change, is add a little error handling. get_password_reset_key can return a WP_Error. So there should be the following check added.
if ( is_wp_error( $key ) ) { return; }
#6
in reply to: ↑ 5
@
8 years ago
@spacedmonkey you're right. Thanks for the tip 💯
The only thing I would change, is add a little error handling.
get_password_reset_keycan return aWP_Error. So there should be the following check added.
if ( is_wp_error( $key ) ) { return; }
#7
@
8 years ago
- Keywords needs-refresh added
- Owner set to
- Status new → assigned
45745.1.diff needs to be refreshed against trunk.
Assigning to mark good first bug claimed.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
CCing @mikeschroder for background on this one.