Filter
rpress_validate_user_verification_token
On this page
Filters whether a user verification URL has a valid token.
Runs at the end of rpress_validate_user_verification_token(). The default value is true only when the token in the URL equals a freshly generated token for the same URL. Return false to reject an otherwise valid link.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$ret | bool | Whether the token matched. |
$url | string | The full URL being validated. |
$query_args | array | Query arguments parsed from the URL. |
Return value#
bool. True if the token is valid.
Example#
function my_validate_verification_token( $ret, $url, $query_args ) {
if ( $ret && empty( $query_args['user_id'] ) ) {
return false;
}
return $ret;
}
add_filter( 'rpress_validate_user_verification_token', 'my_validate_verification_token', 10, 3 );
Notes#
An expired link ends the request before this filter runs.
Source#
Applied in:
includes/user-functions.php(line 781), inrpress_validate_user_verification_token()
See also#
Was this page helpful?
