[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 04:42:42 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:
 Severity:  normal                  |  Resolution:
 Keywords:  needs-patch             |     Focuses:
------------------------------------+-------------------------------
Changes (by dd32):

 * severity:  major => normal


Comment:

 The `user_pass` is a required parameter of `wp_insert_user()` at present.
 It's not optional, nor is it defaulting to a random password.

 > In this case, WordPress correctly generates a random password for the
 user.

 This functionality is not part of `wp_insert_user()`, instead this is part
 of `register_new_user()` which does not allow specifying the user's
 password.

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


More information about the wp-trac mailing list