[wp-trac] [WordPress Trac] #40477: REST API: Does NOT Trigger New User Notifications!
WordPress Trac
noreply at wordpress.org
Thu Jul 25 18:54:11 UTC 2024
#40477: REST API: Does NOT Trigger New User Notifications!
-------------------------------------------------+-------------------------
Reporter: mrahmadawais | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Users | Version: 4.7
Severity: normal | Resolution:
Keywords: dev-feedback has-patch needs- | Focuses: rest-api
testing needs-unit-tests |
-------------------------------------------------+-------------------------
Comment (by colorful tones):
Tested patch
[https://core.trac.wordpress.org/attachment/ticket/40477/40477.diff
40477.diff] and verified it is working.
Testing scenario:
- Running [https://github.com/WordPress/wordpress-develop?tab=readme-ov-
file#local-development Dockerized wordpress-develop GitHub mirror].
- Run `grunt
patch:https://core.trac.wordpress.org/attachment/ticket/40477/40477.diff`
(from [https://github.com/wordpress/grunt-patch-wordpress?tab=readme-ov-
file#apply-a-patch-from-the-command-line these instructions]) to apply
patch.
- Install [https://wordpress.org/plugins/email-log/ Email Log] plugin to
monitor email activity.
- Create a new WordPress user with Administrator role (need to have
create_user rights). Generate an
[https://make.wordpress.org/core/2020/11/05/application-passwords-
integration-guide/ Application Password] for new user.
- Use `curl` to create a new user and verify email is triggered in Email
Logs admin screen ✅. (full curl request below)
{{{
curl --user "test_user:loUEbMZDT4Cf3cZQNy6K7CDi" \
-X POST \
-H "Content-Type: application/json" \
-d
'{"username":"larry","password":"secret","email":"larry at example.com"}' \
http://localhost:8889/wp-json/wp/v2/users
}}}
I can not speak to whether the code introduced is ideal, but it addresses
the issue. Thanks for the patch @nikunj8866
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40477#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list