Making WordPress.org


Ignore:
Timestamp:
02/02/2022 08:40:57 AM (3 years ago)
Author:
dd32
Message:

Login: Run the wp_insert_user() filters during the registration process.

This prevent filters/errors that occur during the pending->user account process not being surfaced during registration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/register.php

    r11073 r11505  
    2323$error_user_login = $error_user_email = $error_recapcha_status = $terms_of_service_error = false;
    2424if ( $_POST ) {
     25
     26    /** This filter is documented in wp-includes/user.php */
     27    $user_login = apply_filters( 'pre_user_login', $user_login );
     28
     29    /** This filter is documented in wp-includes/user.php */
     30    $user_email = apply_filters( 'pre_user_email', $user_email );
    2531
    2632    $error_user_login = rest_do_request( new WP_REST_Request( 'GET', '/wporg/v1/username-available/' . urlencode( $user_login ) ) );
Note: See TracChangeset for help on using the changeset viewer.