WordPress.org

Make WordPress Core

Ticket #7002: 7002.001.diff

File 7002.001.diff, 593 bytes (added by AaronCampbell, 7 years ago)
  • trunk/wp-login.php

     
    341341 
    342342case 'login' : 
    343343default: 
     344        $user = wp_signon(); 
     345 
    344346        if ( isset( $_REQUEST['redirect_to'] ) ) 
    345347                $redirect_to = $_REQUEST['redirect_to']; 
    346348        else 
    347349                $redirect_to = 'wp-admin/'; 
    348350 
    349         $user = wp_signon(); 
    350  
    351351        if ( !is_wp_error($user) ) { 
    352352                // If the user can't edit posts, send them to their profile. 
    353353                if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )