Changeset 54477 for trunk/src/wp-includes/user.php
- Timestamp:
- 10/11/2022 01:43:20 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r54397 r54477 3039 3039 } 3040 3040 3041 $user_login = trim( wp_unslash( $user_login ) ); 3042 3041 3043 if ( empty( $user_login ) ) { 3042 3044 $errors->add( 'empty_username', __( '<strong>Error:</strong> Please enter a username or email address.' ) ); 3043 3045 } elseif ( strpos( $user_login, '@' ) ) { 3044 $user_data = get_user_by( 'email', trim( wp_unslash( $user_login ) ) ); 3046 $user_data = get_user_by( 'email', $user_login ); 3047 3048 if ( empty( $user_data ) ) { 3049 $user_data = get_user_by( 'login', $user_login ); 3050 } 3051 3045 3052 if ( empty( $user_data ) ) { 3046 3053 $errors->add( 'invalid_email', __( '<strong>Error:</strong> There is no account with that username or email address.' ) ); 3047 3054 } 3048 3055 } else { 3049 $user_data = get_user_by( 'login', trim( wp_unslash( $user_login ) ));3056 $user_data = get_user_by( 'login', $user_login ); 3050 3057 } 3051 3058
Note: See TracChangeset
for help on using the changeset viewer.