Changeset 9146 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-restapi.php
- Timestamp:
- 09/23/2019 03:52:23 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-restapi.php
r6493 r9146 36 36 } 37 37 38 // Check we don't have a pending registration for that username. 39 if ( $pending = wporg_get_pending_user( $login ) ) { 40 return [ 41 'available' => false, 42 'error' => __( 'That username is already in use.', 'wporg' ) . '<br>' . __( 'The registration is still pending, please check your email for the confirmation link.', 'wporg' ), 43 'avatar' => get_avatar( $pending->user_email, 64 ), 44 ]; 45 } 46 38 47 // Perform general validations. 39 48 $validate_signup_error = $validate_signup['errors']->get_error_message( 'user_name' ); … … 61 70 } 62 71 72 // Check we don't have a pending registration for that email. 73 if ( $pending = wporg_get_pending_user( $email ) ) { 74 return [ 75 'available' => false, 76 'error' => __( 'That email address already has an account.', 'wporg' ) . '<br>' . __( 'The registration is still pending, please check your email for the confirmation link.', 'wporg' ), 77 'avatar' => get_avatar( $email, 64 ), 78 ]; 79 } 80 63 81 $validate_signup = wpmu_validate_user_signup( '', $email ); 64 82 $validate_signup_error = $validate_signup['errors']->get_error_message( 'user_email' );
Note: See TracChangeset
for help on using the changeset viewer.