[wp-trac] [WordPress Trac] #40477: REST API: Does NOT Trigger New User Notifications!

WordPress Trac noreply at wordpress.org
Wed May 10 17:05:55 UTC 2017


#40477: REST API: Does NOT Trigger New User Notifications!
-------------------------------------------------+-------------------------
 Reporter:  mrahmadawais                         |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Users                                |  Review
 Severity:  normal                               |     Version:  4.7
 Keywords:  dev-feedback has-patch needs-        |  Resolution:
  testing needs-unit-tests                       |     Focuses:  rest-api
-------------------------------------------------+-------------------------

Comment (by jnylen0):

 Replying to [comment:10 mrahmadawais]:
 > I have updated the patch to use `'edit_user_created_user'`.
 >
 > This will favor the default notification behavior as well as provide the
 ability to opt-out by defining a custom value for `$notify` as the second
 argument.

 In [attachment:40477.3.patch] I'm not seeing any functionality in place to
 specify `$notify`.  What do you mean by this?

 We discussed a bit more in Slack, and haven't reached a conclusion yet.
 While I recognize the desire for this functionality, I'm not a big fan of
 adding a parameter like `notify` because it's not RESTful (it doesn't
 REpresent the State of an object).

 A potential solution would be adding a new filter like
 `rest_user_created_notification` that plugins can override.  Until then,
 you can use `register_rest_field` to add a suitable parameter here.

 I also wish that we had enabled this behavior by default, for both users
 and comments.

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


More information about the wp-trac mailing list