Changeset 63111 for branches/5.1/src/wp-admin/includes/user.php
- Timestamp:
- 08/06/2026 07:53:19 PM (7 weeks ago)
- File:
-
- 1 edited
-
branches/5.1/src/wp-admin/includes/user.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.1/src/wp-admin/includes/user.php
r44708 r63111 45 45 } 46 46 47 $errors = new WP_Error(); 48 47 49 $pass1 = $pass2 = ''; 48 50 if ( isset( $_POST['pass1'] ) ) { … … 78 80 79 81 if ( isset( $_POST['email'] ) ) { 80 $user->user_email = sanitize_text_field( wp_unslash( $_POST['email'] ) ); 82 $maybe_email = wp_unslash( $_POST['email'] ); 83 if ( is_string( $maybe_email ) && is_email( $maybe_email ) ) { 84 $user->user_email = $maybe_email; 85 } else { 86 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) ); 87 } 81 88 } 82 89 if ( isset( $_POST['url'] ) ) { … … 139 146 $user->use_ssl = 1; 140 147 } 141 142 $errors = new WP_Error();143 148 144 149 /* checking that username has been typed */
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)