WordPress.org

Make WordPress Core

Ticket #14949: 14949-user-prior-filter.patch

File 14949-user-prior-filter.patch, 496 bytes (added by hakre, 4 years ago)

Similar to filosofo's patch but passes current user to login_redirect filter.

  • wp-login.php

     
    533533 
    534534        $user = wp_signon('', $secure_cookie); 
    535535 
     536        if ( is_wp_error( $user ) && is_user_logged_in() ) 
     537                $user = wp_get_current_user(); 
     538 
    536539        $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user); 
    537540 
    538541        if ( !is_wp_error($user) && !$reauth ) {