Users: Add extra checking to wp_new_user_notification().

Prevent a notification from being sent when an unrecognised value is passed in the `$notify` parameter.

Props cthreelabs, 360zen.
Fixes #44293.



git-svn-id: https://develop.svn.wordpress.org/trunk@44611 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2019-01-16 04:26:48 +00:00
parent 5aeabd7fbf
commit e79bddcb02
2 changed files with 10 additions and 0 deletions

View File

@@ -1169,6 +1169,11 @@ class Tests_User extends WP_UnitTestCase {
true,
true,
),
array(
'THIS IS NOT A SUPPORTED NOTIFICATION TYPE',
false,
false,
),
);
}