Ticket #49860: 49860-3.patch
File 49860-3.patch, 1.3 KB (added by , 12 months ago) |
---|
-
wp-includes/functions.php
7441 7441 } 7442 7442 7443 7443 /** 7444 * Check whether user registration is disabled and password reset is also disabled 7445 * for existing users, and in this case, redirects to login page. 7446 * 7447 * @since Future 7448 */ 7449 function wp_redirect_if_registration_and_reset_disabled() { 7450 if ( ! get_option( 'users_can_register' ) && apply_filters( 'disable_password_reset', false ) ) { 7451 wp_safe_redirect( 'wp-login.php' ); 7452 exit(); 7453 } 7454 } 7455 7456 /** 7444 7457 * Returns RegEx body to liberally match an opening HTML tag. 7445 7458 * 7446 7459 * Matches an opening HTML tag that: -
wp-login.php
823 823 824 824 case 'lostpassword': 825 825 case 'retrievepassword': 826 wp_redirect_if_registration_and_reset_disabled(); 826 827 if ( $http_post ) { 827 828 $errors = retrieve_password(); 828 829 … … 925 926 926 927 case 'resetpass': 927 928 case 'rp': 929 wp_redirect_if_registration_and_reset_disabled(); 928 930 list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) ); 929 931 $rp_cookie = 'wp-resetpass-' . COOKIEHASH; 930 932