Changeset 40320
- Timestamp:
- 03/23/2017 07:00:31 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/install.php
r39323 r40320 335 335 $scripts_to_print[] = 'user-profile'; 336 336 337 display_header(); 337 338 // Fill in the data we gathered 338 339 $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : ''; … … 347 348 if ( empty( $user_name ) ) { 348 349 // TODO: poka-yoke 349 display_header();350 350 display_setup_form( __( 'Please provide a valid username.' ) ); 351 351 $error = true; 352 352 } elseif ( $user_name != sanitize_user( $user_name, true ) ) { 353 display_header();354 353 display_setup_form( __( 'The username you provided has invalid characters.' ) ); 355 354 $error = true; 356 355 } elseif ( $admin_password != $admin_password_check ) { 357 356 // TODO: poka-yoke 358 display_header();359 357 display_setup_form( __( 'Your passwords do not match. Please try again.' ) ); 360 358 $error = true; 361 359 } elseif ( empty( $admin_email ) ) { 362 360 // TODO: poka-yoke 363 display_header();364 361 display_setup_form( __( 'You must provide an email address.' ) ); 365 362 $error = true; 366 363 } elseif ( ! is_email( $admin_email ) ) { 367 364 // TODO: poka-yoke 368 display_header();369 365 display_setup_form( __( 'Sorry, that isn’t a valid email address. Email addresses look like <code>username@example.com</code>.' ) ); 370 366 $error = true; … … 374 370 $wpdb->show_errors(); 375 371 $result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language ); 376 377 // Log the user in and send them to wp-admin:378 if ( ! headers_sent() ) {379 wp_set_auth_cookie( $result['user_id'], true, is_ssl() );380 wp_redirect( admin_url() );381 exit;382 }383 384 // If headers have already been sent, fall back to a "Success!" message:385 display_header();386 372 ?> 387 373 -
trunk/src/wp-includes/default-constants.php
r38839 r40320 206 206 define( 'COOKIEHASH', md5( $siteurl ) ); 207 207 else 208 define( 'COOKIEHASH', md5( wp_guess_url() ));208 define( 'COOKIEHASH', '' ); 209 209 } 210 210
Note: See TracChangeset
for help on using the changeset viewer.