1

I have this code for redirects.

function login_init () {
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'login';

if ( isset( $_POST['wp-submit'] ) ) {
    $action = 'post-data';
} else if ( isset( $_GET['reauth'] ) ) {
    $action = 'reauth';
} else if ( isset($_GET['key']) ) {
    $action = 'resetpass-key';
}
else if ( isset($_GET['rp']) ) {
    $action = 'rp';
}

if (
    $action == 'post-data'        ||            // don't mess with POST requests
    $action == 'reauth'           ||            // need to reauthorize
    $action == 'resetpass-key'    ||            // password recovery
    $action == 'logout'                         // user is logging out
) {
    return;
}
if ( $action != 'rp' && $action != 'lostpassword') {

    wp_redirect( home_url( '/login/' ) );
    exit;
}
}
add_action('login_init', 'login_init');

However reset pass doesnt actually update when submitting the data, what exception to redirect am i missing so the update pass goes through?

Edit:

Been trying the past few days, still cant figure out what is stopping the reset pass. I need to be all through de-branded forms.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.