reset_password( WP_User $user, string $new_pass )

In this article

Handles resetting the user’s password.

Parameters

$userWP_Userrequired
The user
$new_passstringrequired
New password for the user in plaintext

Source

	'message' => $message,
	'headers' => '',
);

/**
 * Filters the contents of the reset password notification email sent to the user.
 *
 * @since 6.0.0
 *
 * @param array $defaults {
 *     The default notification email arguments. Used to build wp_mail().
 *
 *     @type string $to      The intended recipient - user email address.
 *     @type string $subject The subject of the email.
 *     @type string $message The body of the email.
 *     @type string $headers The headers of the email.
 * }
 * @param string  $key        The activation key.
 * @param string  $user_login The username for the user.
 * @param WP_User $user_data  WP_User object.
 */
$notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $key, $user_login, $user_data );

if ( $switched_locale ) {

Changelog

VersionDescription
2.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.