- fixed filter 'wp_authenticate_user' variables (changed username to WP_User object);

This commit is contained in:
nikitasinelnikov
2020-07-08 19:27:14 +03:00
parent 3deab91659
commit 62f8b4e2f0
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -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
+1
View File
@@ -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 =