You appear to be a bot. Output may be restricted
Description
Generate a token for a URL and match it against the existing token to make sure the URL hasn't been tampered with.
Usage
$bool = edd_validate_user_verification_token( $url );
Parameters
- $url
- ( string ) optional – URL to test.
Returns
bool
Source
File name: easy-digital-downloads/includes/user-functions.php
Lines:
1 to 33 of 33
function edd_validate_user_verification_token( $url = '' ) { $ret = false; $parts = parse_url( $url ); $query_args = array(); if ( isset( $parts['query'] ) ) { wp_parse_str( $parts['query'], $query_args ); if ( isset( $query_args['ttl'] ) && current_time( 'timestamp' ) > $query_args['ttl'] ) { do_action( 'edd_user_verification_token_expired' ); $link_text = sprintf( __( 'Sorry but your account verification link has expired. <a href="%s">Click here</a> to request a new verification URL.', 'easy-digital-downloads' ), edd_get_user_verification_request_url() ); wp_die( apply_filters( 'edd_verification_link_expired_text', $link_text ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); } if ( isset( $query_args['token'] ) && $query_args['token'] == edd_get_user_verification_token( $url ) ) { $ret = true; } } return apply_filters( 'edd_validate_user_verification_token', $ret, $url, $query_args ); }