*
* @since 2.0.0
* @since 4.3.0 The `$plaintext_pass` parameter was changed to `$notify`.
+ * @since 4.3.1 The `$plaintext_pass` parameter was deprecated. `$notify` added as a third parameter.
*
- * @param int $user_id User ID.
- * @param string $notify Whether admin and user should be notified ('both') or
- * only the admin ('admin' or empty).
+ * @global wpdb $wpdb WordPress database object for queries.
+ * @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
+ *
+ * @param int $user_id User ID.
+ * @param null $deprecated Not used (argument deprecated).
+ * @param string $notify Optional. Type of notification that should happen. Accepts 'admin' or an empty
+ * string (admin only), or 'both' (admin and user). The empty string value was kept
+ * for backward-compatibility purposes with the renamed parameter. Default empty.
*/
-function wp_new_user_notification( $user_id, $notify = '' ) {
- global $wpdb;
+function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) {
+ if ( $deprecated !== null ) {
+ _deprecated_argument( __FUNCTION__, '4.3.1' );
+ }
+
+ global $wpdb, $wp_hasher;
$user = get_userdata( $user_id );
// The blogname option is escaped with esc_html on the way into the database in sanitize_option