Handles resetting the user’s password.

Signature

reset_password( $user, $new_pass )
user
 (object) The user
new_pass
 (string) New password for the user in plaintext

Return

(void)

Source

function reset_password( $user, $new_pass ) {
	/**
	 * Fires before the user's password is reset.
	 *
	 * @since 1.5.0
	 *
	 * @param object $user     The user.
	 * @param string $new_pass New user password.
	 */
	do_action( 'password_reset', $user, $new_pass );

	wp_set_password( $new_pass, $user->ID );
	update_user_option( $user->ID, 'default_password_nag', false, true );

	wp_password_change_notification( $user );
}
WP Trac GitHub

Link here