WP_Session_Tokens::verify()publicWP 4.0.0

Validates the given session token for authenticity and validity.

Checks that the given token is present and hasn't expired.

{} It's a method of the class: WP_Session_Tokens{}

No Hooks.


true|false. Whether the token is valid for the user.


$WP_Session_Tokens = new WP_Session_Tokens();
$WP_Session_Tokens->verify( $token );
$token(string) (required)
Token to verify.


Since 4.0.0 Introduced.

Code of WP_Session_Tokens::verify() WP 6.0.2

final public function verify( $token ) {
	$verifier = $this->hash_token( $token );
	return (bool) $this->get_session( $verifier );