[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 10:32:30 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:
-------------------------------------+-------------------------------

Comment (by hbhalodia):

 Hi @iamadisingh, I think sending an WP_Error is not a good idea as WP
 automatically handle new password creation, instead what can be done is we
 can add a check which is already added while the user is updated -
 https://github.com/WordPress/wordpress-
 develop/blob/ce9fd87141a4cd948a2ecd15322f9d9a87a85651/src/wp-
 includes/user.php#L2221

 I have added a PR to add the similar check for the same -
 https://github.com/WordPress/wordpress-develop/pull/9364

 Thank You,

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


More information about the wp-trac mailing list