[wp-trac] [WordPress Trac] #49639: Add a filter on wp_insert_user function regarding $user_pass

WordPress Trac noreply at wordpress.org
Tue May 11 20:54:26 UTC 2021


#49639: Add a filter on wp_insert_user function regarding $user_pass
-------------------------------------------------+-------------------------
 Reporter:  stokim                               |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Users                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback 2nd-opinion needs-      |     Focuses:
  patch                                          |
-------------------------------------------------+-------------------------
Changes (by jorbin):

 * keywords:  has-patch dev-feedback 2nd-opinion => dev-feedback 2nd-opinion
     needs-patch
 * focuses:  privacy =>


Comment:

 Thanks for the first pass @tomjdevisser. A few notes

 All filters need a doc block https://developer.wordpress.org/coding-
 standards/inline-documentation-standards/php/#4-hooks-actions-and-filters

 We also need to make sure that the results of the filter are being used.
 In this pass, `$pre_hash_password` is set but then goes nowhere. I think
 it might also be good to check after that it isn't a falsy value and
 return a wp_error if that is the case.

 I also think this needs to take into account updating users and not just
 inserting them.

 As for the privacy concerns, plugins already have access to this from the
 global $_POST.

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


More information about the wp-trac mailing list