Skip to content

Commit bac5b14

Browse files
authored
Fix username login issues i18n messages
1 parent 9200b00 commit bac5b14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classes/helpers/class-member-auth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ public static function authenticate($username, $password) {
116116
}
117117

118118
$member = apply_filters('mpt_authenticate', null, $username, $password);
119-
if ( $member == null ) {
120-
// Only needed if all authentication handlers fail to return anything.
119+
if ( $member == null || isset( $member->errors['invalid_username'] ) ) {
120+
// Only needed if all authentication handlers fail to return anything && username issues
121121
$member = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.', 'mpt'));
122122
}
123123

0 commit comments

Comments
 (0)