WordPress.org

Make WordPress Core

Ticket #35428: ms-functions.php.patch

File ms-functions.php.patch, 945 bytes (added by pbearne, 4 years ago)

patch

  • wp-includes/ms-functions.php

     
    982982        if ( empty($signup->domain) ) {
    983983                $wpdb->update( $wpdb->signups, array('active' => 1, 'activated' => $now), array('activation_key' => $key) );
    984984
    985                 if ( isset( $user_already_exists ) )
    986                         return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup);
     985                if ( isset( $user_already_exists ) ){
     986                        /**
     987                         * allow the suppression of errors if user already exists.
     988                         *
     989                         * @since 4.5
     990                         *
     991                         * @param WP_Error
     992                         */
     993                        return apply_filters('_wpmu_activate_existing_error_', new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup ), get_defined_vars() );
    987994
     995                }
     996
    988997                /**
    989998                 * Fires immediately after a new user is activated.
    990999                 *