Opened 6 years ago
Closed 5 years ago
#45745 closed enhancement (fixed)
wp_new_user_notification should use get_password_reset_key
Reported by: | spacedmonkey | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Users | Keywords: | good-first-bug has-patch needs-refresh |
Focuses: | Cc: |
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)
@
6 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
@
6 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
@
6 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_key
can return aWP_Error
. So there should be the following check added.
if ( is_wp_error( $key ) ) { return; }
#7
@
5 years ago
- Keywords needs-refresh added
- Owner set to mrasharirfan
- Status changed from new to assigned
45745.1.diff needs to be refreshed against trunk
.
Assigning to mark good first bug claimed.
CCing @mikeschroder for background on this one.