[wp-trac] [WordPress Trac] #45745: wp_new_user_notification should use get_password_reset_key

WordPress Trac noreply at wordpress.org
Mon Jan 7 04:20:37 UTC 2019


#45745: wp_new_user_notification should use get_password_reset_key
--------------------------------------+------------------------------
 Reporter:  spacedmonkey              |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Users                     |     Version:  4.4
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:
--------------------------------------+------------------------------

Comment (by mrasharirfan):

 @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 a `WP_Error`. So there should be the
 following check added.
 >
 > {{{#!php
 > if ( is_wp_error( $key ) ) {
 >     return;
 > }
 > }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45745#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list