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