Make WordPress Core

Ticket #44293: 44293.2.diff

File 44293.2.diff, 576 bytes (added by cthreelabs, 5 years ago)

Fixed issue from earlier path and tested , Allows default ' ', both,admin,and user as notify params and made as case sensitive.

  • src/wp-includes/pluggable.php

    diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php
    index cb06297b57..f4e9c16492 100644
    a b if ( ! function_exists( 'wp_new_user_notification' ) ) : 
    18921892                        _deprecated_argument( __FUNCTION__, '4.3.1' );
    18931893                }
    18941894
     1895                // Accepts only 'user', 'admin' , 'both' or default '' as $notify
     1896                if(  false ==  ( empty($notify) || in_array( $notify, array('user','admin','both'),true ) ) ) {
     1897                        return;
     1898                }
     1899
    18951900                global $wpdb, $wp_hasher;
    18961901                $user = get_userdata( $user_id );
    18971902