WordPress.org

Make WordPress Core

Ticket #47902: 47902.diff

File 47902.diff, 563 bytes (added by juliobox, 22 months ago)
  • wp-includes/user.php

    diff --git a/wp-includes/user.php b/wp-includes/user.php
    index 9c8d789..4740979 100644
    a b function wp_insert_user( $userdata ) { 
    17941794         */
    17951795        $data = apply_filters( 'wp_pre_insert_user_data', $data, $update, $update ? (int) $ID : null );
    17961796
     1797        if ( ! is_array( $data ) || empty( $data ) ) {
     1798                return new WP_Error( 'empty_data', __( 'Not enough data to create this user.' ) );
     1799        }
     1800
    17971801        if ( $update ) {
    17981802                if ( $user_email !== $old_user_data->user_email ) {
    17991803                        $data['user_activation_key'] = '';