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

WordPress Trac noreply at wordpress.org
Sat Jun 2 02:11:11 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:                |     Focuses:
--------------------------+------------------------------
Changes (by kraftbj):

 * version:  4.9.6 => 4.3
 * component:  Mail => Users


Comment:

 Howdy! Thanks for noticing and for writing up a report.

 If either option is chosen, I'd go with option 1. Option 2 would make any
 future changes more difficult since there isn't a canonically stated way
 to utilize the function (e.g. if we add a new option for the third
 argument of "alladmins" (to send a notice all users with the role of
 admin), for example, that could create headaches for anyone who happened
 to utilize that as it is.

 The change goes back to 4.3 with the new stronger password UI and flow.
 Previously, the second arg was the plaintext password and, if present, it
 would be sent in plaintext via e-mail. If the arg was empty, an e-mail
 would not be sent out. So, the code is reflecting the old method of the
 second argument, which was added back when adding the third argument to
 provide a way to control the notification.

 Let's validate `both`, `admin`, and `user` to prevent something unexpected
 working and putting us into a corner later.

 @360zen are you interested in contributing a patch?

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


More information about the wp-trac mailing list