Changeset 23634
- Timestamp:
- 03/07/2013 06:00:16 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/user.php
r23567 r23634 45 45 $pass1 = $pass2 = ''; 46 46 if ( isset( $_POST['pass1'] )) 47 $pass1 = $_POST['pass1'];47 $pass1 = wp_unslash( $_POST['pass1'] ); 48 48 if ( isset( $_POST['pass2'] )) 49 $pass2 = $_POST['pass2'];49 $pass2 = wp_unslash( $_POST['pass2'] ); 50 50 51 51 if ( isset( $_POST['role'] ) && current_user_can( 'edit_users' ) ) { … … 107 107 /* checking that username has been typed */ 108 108 if ( $user->user_login == '' ) 109 $errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ) );109 $errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ) ); 110 110 111 111 /* checking the password has been typed twice */ 112 do_action_ref_array( 'check_passwords', array ( $user->user_login, & $pass1, & $pass2 ));112 do_action_ref_array( 'check_passwords', array( $user->user_login, &$pass1, &$pass2 ) ); 113 113 114 114 if ( $update ) { … … 151 151 152 152 // Allow plugins to return their own errors. 153 do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) );153 do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) ); 154 154 155 155 if ( $errors->get_error_codes() ) … … 160 160 } else { 161 161 $user_id = wp_insert_user( $user ); 162 wp_new_user_notification( $user_id, isset( $_POST['send_password']) ? $pass1 : '' );162 wp_new_user_notification( $user_id, isset( $_POST['send_password'] ) ? $pass1 : '' ); 163 163 } 164 164 return $user_id;
Note: See TracChangeset
for help on using the changeset viewer.