Ticket #5579: 5579-Remove-user_pass_ok.diff
File 5579-Remove-user_pass_ok.diff, 1.3 KB (added by , 17 years ago) |
---|
-
wp-includes/user.php
13 13 return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_type = 'post' AND " . get_private_posts_cap_sql('post')); 14 14 } 15 15 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 22 16 // 23 17 // User option functions 24 18 // -
xmlrpc.php
17 17 18 18 include('./wp-config.php'); 19 19 20 if ( !function_exists('user_pass_ok') ) : 21 function user_pass_ok($user_login,$user_pass) { 22 global $cache_userdata; 23 if ( empty($cache_userdata[$user_login]) ) { 24 $userdata = get_userdatabylogin($user_login); 25 } else { 26 $userdata = $cache_userdata[$user_login]; 27 } 28 return (md5($user_pass) == $userdata->user_pass); 29 } 30 endif; 31 20 32 if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd 21 33 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); 22 34 ?>