Users: Correctly display an error message after clicking the "Send Reset Link" button.

The `addInlineNotice()` function expects a single string as a success or error message, not an array of strings.

Follow-up to [50129].

Props audrasjb.
Fixes #52573.

git-svn-id: https://develop.svn.wordpress.org/trunk@50390 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-02-19 17:22:37 +00:00
parent d1c40e9a3d
commit d77042872c

View File

@ -5433,6 +5433,6 @@ function wp_ajax_send_password_reset() {
sprintf( __( 'A password reset link was emailed to %s.' ), $user->display_name )
);
} else {
wp_send_json_error( $results );
wp_send_json_error( $results->get_error_message() );
}
}