diff --git a/includes/core/um-actions-login.php b/includes/core/um-actions-login.php index 5c773012..f0dd2bd3 100644 --- a/includes/core/um-actions-login.php +++ b/includes/core/um-actions-login.php @@ -68,9 +68,9 @@ function um_submit_form_errors_hook_login( $args ) { UM()->form()->add_error( $user->get_error_code(), __( $user->get_error_message(), 'ultimate-member' ) ); } - $authenticate_user = apply_filters( 'wp_authenticate_user', $user_name, $args['user_password'] ); - if ( is_wp_error( $authenticate_user ) && ! in_array( $authenticate_user->get_error_code(), $ignore_codes ) ) { - UM()->form()->add_error( $authenticate_user->get_error_code(), __( $authenticate_user->get_error_message(), 'ultimate-member' ) ); + $user = apply_filters( 'wp_authenticate_user', $user, $args['user_password'] ); + if ( is_wp_error( $user ) && ! in_array( $user->get_error_code(), $ignore_codes ) ) { + UM()->form()->add_error( $user->get_error_code(), __( $user->get_error_message(), 'ultimate-member' ) ); } // if there is an error notify wp diff --git a/readme.txt b/readme.txt index 2feb6a2f..4843b130 100644 --- a/readme.txt +++ b/readme.txt @@ -150,6 +150,7 @@ The plugin works with popular caching plugins by automatically excluding Ultimat - Fixed "get_profile_photo_size" function (avoid PHP notice with array_combine ) - Fixed password reset/change form when other forms are initialized at the same page - Fixed getting extension updates on multisites + - Fixed the 'wp_authenticate_user' filter's variables (changed username string to WP_User object) - Deprecated JS event 'um_before_modal_removed', use wp.hooks action 'um_before_modal_removed' instead = 2.1.6: June 1, 2020 =