Ticket #12282: redirect.patch
| File redirect.patch, 1.2 KB (added by , 16 years ago) |
|---|
-
wp-login.php
422 422 case 'rp' : 423 423 $errors = reset_password($_GET['key'], $_GET['login']); 424 424 425 if ( ! is_wp_error($errors) ) { 426 wp_redirect('wp-login.php?checkemail=newpass'); 425 if ( !is_wp_error($errors) ) { 426 if ( isset( $_REQUEST['redirect_to'] ) ) { 427 wp_safe_redirect($_REQUEST['redirect_to']); 428 } else { 429 wp_redirect('wp-login.php?checkemail=newpass'); 430 } 427 431 exit(); 428 432 } 429 433 … … 452 456 $user_login = $_POST['user_login']; 453 457 $user_email = $_POST['user_email']; 454 458 $errors = register_new_user($user_login, $user_email); 455 if ( !is_wp_error($errors) ) { 456 wp_redirect('wp-login.php?checkemail=registered'); 457 exit(); 458 } 459 if ( !is_wp_error($errors) ) { 460 if ( isset( $_REQUEST['redirect_to'] ) ) { 461 wp_safe_redirect($_REQUEST['redirect_to']); 462 } else { 463 wp_redirect('wp-login.php?checkemail=registered'); 464 } 465 exit(); 466 } 459 467 } 460 468 461 469 login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);