Throws an exception if the token is invalid
Usage
// basic usage
$bool = $sessionCSRF->validate();
// usage with all arguments
$bool = $sessionCSRF->validate($id = '');
Arguments
Name | Type(s) | Description |
---|---|---|
id (optional) | int, string, null | Optional unique ID for this token |
Return value
bool
Always returns true or throws exception
Exceptions
Method can throw exceptions on error:
WireCSRFException
- if token not valid
SessionCSRF methods and properties
API reference based on ProcessWire core version 3.0.236