Filter
rpress_get_user_verification_token_algorithm
On this page
Filters the hash algorithm used to derive the verification token secret.
Runs in rpress_get_user_verification_token(). The returned algorithm name is passed to PHP hash() together with wp_salt() to produce the default secret that is later mixed into the token. The token itself is still an md5 of the URL path and query string.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$algorithm | string | Hash algorithm name. Defaults to sha256. |
Return value#
string. A hash algorithm name supported by PHP hash().
Example#
function my_verification_token_algorithm( $algorithm ) {
return 'sha512';
}
add_filter( 'rpress_get_user_verification_token_algorithm', 'my_verification_token_algorithm' );
Notes#
Changing this changes every token, so verification links already sent stop validating. Return only an algorithm that hash() supports.
Source#
Applied in:
includes/user-functions.php(line 714), inrpress_get_user_verification_token()
See also#
Was this page helpful?
