Introduce the xmlrpc_login_error filter, applied to the IXR_Error being returned by the server when login() fails. props JustinSainton, fixes #21907.

git-svn-id: https://develop.svn.wordpress.org/trunk@21912 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-09-19 01:36:47 +00:00
parent 44cd6b7e85
commit d904430fc0
1 changed files with 2 additions and 1 deletions

View File

@ -187,7 +187,8 @@ class wp_xmlrpc_server extends IXR_Server {
$user = wp_authenticate($username, $password);
if (is_wp_error($user)) {
$this->error = new IXR_Error( 403, __('Bad login/pass combination.' ) );
$this->error = new IXR_Error( 403, __( 'Incorrect username or password.' ) );
$this->error = apply_filters( 'xmlrpc_login_error', $this->error, $user );
return false;
}