Make WordPress Core


Ignore:
Timestamp:
01/16/2019 04:26:48 AM (6 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r44386 r44611  
    18951895        }
    18961896
     1897        // Accepts only 'user', 'admin' , 'both' or default '' as $notify
     1898        if ( ! in_array( $notify, array( 'user', 'admin', 'both', '' ), true ) ) {
     1899            return;
     1900        }
     1901
    18971902        global $wpdb, $wp_hasher;
    18981903        $user = get_userdata( $user_id );
Note: See TracChangeset for help on using the changeset viewer.