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:
parent
44cd6b7e85
commit
d904430fc0
|
@ -187,7 +187,8 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$user = wp_authenticate($username, $password);
|
$user = wp_authenticate($username, $password);
|
||||||
|
|
||||||
if (is_wp_error($user)) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue