[wp-trac] [WordPress Trac] #63770: WordPress wp_insert_user() throws warning when password is not provided

WordPress Trac noreply at wordpress.org
Thu Jul 31 22:55:55 UTC 2025


#63770: WordPress wp_insert_user() throws warning when password is not provided
-------------------------------------+-------------------------------
 Reporter:  sheldorofazeroth         |       Owner:  sheldorofazeroth
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Login and Registration   |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  has-test-info has-patch  |     Focuses:  docs
-------------------------------------+-------------------------------
Changes (by peterwilsoncc):

 * focuses:   => docs


Comment:

 I agree with @dd32 that throwing a warning in this instance is correct.
 The error can only be hit when developers call the function incorrectly.

 I think the fix for this is to improve the documentation for the function
 to note which items are required and which items are optional in the
 `$userdata` docblock.

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


More information about the wp-trac mailing list