Use distinct error code in wp_authenticate_username_password() when user is a spammer. props sirzooro. fixes #19445.
git-svn-id: https://develop.svn.wordpress.org/trunk@23579 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
12882f9848
commit
3e811c5171
|
@ -92,7 +92,7 @@ function wp_authenticate_username_password($user, $username, $password) {
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
// Is user marked as spam?
|
// Is user marked as spam?
|
||||||
if ( 1 == $user->spam )
|
if ( 1 == $user->spam )
|
||||||
return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Your account has been marked as a spammer.'));
|
return new WP_Error( 'spammer_account', __( '<strong>ERROR</strong>: Your account has been marked as a spammer.' ) );
|
||||||
|
|
||||||
// Is a user's blog marked as spam?
|
// Is a user's blog marked as spam?
|
||||||
if ( !is_super_admin( $user->ID ) && isset( $user->primary_blog ) ) {
|
if ( !is_super_admin( $user->ID ) && isset( $user->primary_blog ) ) {
|
||||||
|
|
Loading…
Reference in New Issue