Ticket #21907: 21907.diff
File 21907.diff, 1.1 KB (added by , 12 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
203 203 * @param string $password User's password. 204 204 * @return mixed WP_User object if authentication passed, false otherwise 205 205 */ 206 function login( $username, $password) {206 function login( $username, $password ) { 207 207 // Respect any old filters against get_option() for 'enable_xmlrpc'. 208 208 $enabled = apply_filters( 'pre_option_enable_xmlrpc', false ); // Deprecated 209 209 if ( false === $enabled ) … … 217 217 return false; 218 218 } 219 219 220 $user = wp_authenticate($username, $password);220 $user = apply_filters( 'xmlrpc_userlogin_object', wp_authenticate( $username, $password ) ); 221 221 222 if ( is_wp_error($user)) {223 $this->error = new IXR_Error(403, __('Bad login/pass combination.'));222 if ( is_wp_error( $user ) ) { 223 $this->error = apply_filters( 'xmlrpc_userlogin_error', new IXR_Error( 403, __( 'Bad login/pass combination.' ) ); 224 224 return false; 225 225 } 226 226