Changeset 63112 for branches/5.0/src/wp-admin/includes/user.php
- Timestamp:
- 08/06/2026 07:54:07 PM (7 weeks ago)
- File:
-
- 1 edited
-
branches/5.0/src/wp-admin/includes/user.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-admin/includes/user.php
r43487 r63112 43 43 $user->user_login = sanitize_user($_POST['user_login'], true); 44 44 45 $errors = new WP_Error(); 46 45 47 $pass1 = $pass2 = ''; 46 48 if ( isset( $_POST['pass1'] ) ) … … 63 65 } 64 66 65 if ( isset( $_POST['email'] )) 66 $user->user_email = sanitize_text_field( wp_unslash( $_POST['email'] ) ); 67 if ( isset( $_POST['email'] ) ) { 68 $maybe_email = wp_unslash( $_POST['email'] ); 69 if ( is_string( $maybe_email ) && is_email( $maybe_email ) ) { 70 $user->user_email = $maybe_email; 71 } else { 72 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) ); 73 } 74 } 67 75 if ( isset( $_POST['url'] ) ) { 68 76 if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) { … … 117 125 if ( !empty($_POST['use_ssl']) ) 118 126 $user->use_ssl = 1; 119 120 $errors = new WP_Error();121 127 122 128 /* 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)