[wp-trac] [WordPress Trac] #58194: Users: Don't show 'Reset Password' link if password reset is not allowed

WordPress Trac noreply at wordpress.org
Thu Jul 6 13:05:30 UTC 2023


#58194: Users: Don't show 'Reset Password' link if password reset is not allowed
-------------------------------------------------+-------------------------
 Reporter:  ocean90                              |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.3
Component:  Users                                |     Version:  5.7
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  good-first-bug has-patch needs-      |     Focuses:
  testing                                        |  administration
-------------------------------------------------+-------------------------
Changes (by ocean90):

 * keywords:  good-first-bug has-patch => good-first-bug has-patch needs-
     testing


Comment:

 The `WP_Error` is just for back-compat as it was already possible before,
 see https://github.com/WordPress/wordpress-
 develop/blob/bea4307daa21a3f97d159898b0ac676332e0e7de/src/wp-
 includes/user.php#L2903-L2905.

 Since it wasn't documented in the filter before I didn't want to promote
 this usage further but since it's possible it's important to document at
 least the return value otherwise a non-true check will cause issues. I
 think [56150] is good as is.

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


More information about the wp-trac mailing list