Changeset 63104 for branches/5.8/src/wp-admin/includes/user.php
- Timestamp:
- 08/06/2026 07:46:36 PM (7 weeks ago)
- File:
-
- 1 edited
-
branches/5.8/src/wp-admin/includes/user.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8/src/wp-admin/includes/user.php
r56884 r63104 45 45 } 46 46 47 $errors = new WP_Error(); 48 47 49 $pass1 = ''; 48 50 $pass2 = ''; … … 79 81 80 82 if ( isset( $_POST['email'] ) ) { 81 $user->user_email = sanitize_text_field( wp_unslash( $_POST['email'] ) ); 83 $maybe_email = wp_unslash( $_POST['email'] ); 84 if ( is_string( $maybe_email ) && is_email( $maybe_email ) ) { 85 $user->user_email = $maybe_email; 86 } else { 87 $errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) ); 88 } 82 89 } 83 90 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)