WordPress.org

Make WordPress Core

Ticket #5579: xmlrpc_user_auth.diff

File xmlrpc_user_auth.diff, 1021 bytes (added by PhoenixRises, 13 years ago)
  • wp-includes/user.php

     
    1313        return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_type = 'post' AND " . get_private_posts_cap_sql('post'));
    1414}
    1515
    16 // TODO: xmlrpc only.  Maybe move to xmlrpc.php.
    17 function user_pass_ok($user_login,$user_pass) {
    18         $userdata = get_userdatabylogin($user_login);
    19         return wp_check_password($user_pass, $userdata->user_pass);
    20 }
    21 
    2216//
    2317// User option functions
    2418//
  • xmlrpc.php

     
    147147        }
    148148
    149149        function login_pass_ok($user_login, $user_pass) {
    150                 if (!user_pass_ok($user_login, $user_pass)) {
     150                if (!wp_login($user_login, $user_pass)) {
    151151                        $this->error = new IXR_Error(403, __('Bad login/pass combination.'));
    152152                        return false;
    153153                }