Make WordPress Core

Ticket #15473: 15473.diff

File 15473.diff, 506 bytes (added by Otto42, 14 years ago)

wp_login action hook fix

  • wp-includes/user.php

     
    5959        }
    6060
    6161        wp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie);
    62         do_action('wp_login', $credentials['user_login']);
     62        if ( is_a ($user, 'WP_User') ) {
     63                do_action('wp_login', $user->user_login);
     64        } else {
     65                do_action('wp_login', $credentials['user_login']);
     66        }
    6367        return $user;
    6468}
    6569