[wp-trac] [WordPress Trac] #44293: Discrepancy between documentation and implementation of wp_new_user_notification()

WordPress Trac noreply at wordpress.org
Mon Jun 4 17:01:35 UTC 2018


#44293: Discrepancy between documentation and implementation of
wp_new_user_notification()
----------------------------+------------------------------
 Reporter:  360zen          |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Users           |     Version:  4.3
 Severity:  minor           |  Resolution:
 Keywords:  good-first-bug  |     Focuses:
----------------------------+------------------------------

Comment (by 360zen):

 Replying to [comment:3 360zen]:

 > I would propose that, by default, the function should send both emails
 when called with only the $user_id parameter. So
 `wp_new_user_notification($user_id)` would send both. This could be
 achieved by changing the default of the $notify parameter from `''` to
 `'both'` or modifying the logic used to return early. However, this could
 potentially cause some unexpected emails to go out to users if anyone is
 using the short version of the call (
 `wp_new_user_notification($user_id)`) expecting to send only admin emails.

 After further review and discussion with another dev, I've concluded that
 changing the default behavior here is probably ill-advised. However, there
 should still be better checking of the $notify parameter. I'll plan to
 submit a patch in the next week or so with that change unless directed
 otherwise by someone.

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


More information about the wp-trac mailing list