#34377 closed defect (bug) (fixed)
Another unexpected break in behavior for wp_new_user_notification()
| Reported by: | danielbachhuber | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Users | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
wp_new_user_notification() originally sent two emails if $password was provided: one to the admin, and another to the created user.
r33620 "restored" this behavior, but then r34116 disabled this behavior because the deprecated $password argument isn't checked in this conditional:
if ( 'admin' === $notify || empty( $notify ) ) {
return;
}
If $password is provided, I'd expect the conditional to fail.
I think that $notify could default to 'both', in which case empty( $notify ) could just be removed.
Discovered in https://github.com/wp-cli/wp-cli/pull/2163
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 35735: