wp_generate_user_request_key

Advertisement

Summery Summery

Returns a confirmation key for a user action and stores the hashed version for future comparison.

Syntax Syntax

wp_generate_user_request_key( int $request_id )

Parameters Parameters

$request_id

(Required) Request ID.

Return Return

(string) Confirmation key.

Source Source

File: wp-includes/user.php

	}

	if ( ! $email_sent ) {
		return new WP_Error( 'privacy_email_error', __( 'Unable to send personal data export confirmation email.' ) );
	}

	return true;
}

/**
 * Returns a confirmation key for a user action and stores the hashed version for future comparison.
 *
 * @since 4.9.6
 *
 * @param int $request_id Request ID.
 * @return string Confirmation key.
 */
function wp_generate_user_request_key( $request_id ) {
	global $wp_hasher;

	// Generate something random for a confirmation key.
	$key = wp_generate_password( 20, false );

Advertisement

Changelog Changelog

Changelog
Version Description
4.9.6 Introduced.

Advertisement

Leave a Reply