WP_Session_Tokens::verify
Validates the given session token for authenticity and validity.
Checks that the given token is present and hasn't expired.
Method of the class: WP_Session_Tokens{}
No Hooks.
Returns
true|false. Whether the token is valid for the user.
Usage
$WP_Session_Tokens = new WP_Session_Tokens(); $WP_Session_Tokens->verify( $token );
- $token(string) (required)
- Token to verify.
Changelog
| Since 4.0.0 | Introduced. |
WP_Session_Tokens::verify() WP Session Tokens::verify code WP 6.9.1
final public function verify( $token ) {
$verifier = $this->hash_token( $token );
return (bool) $this->get_session( $verifier );
}