Skip to content

Kirby 5.0.4

$kirby->csrf()

Checks/returns a CSRF token

$kirby->csrf(string|null $check = null): string|bool

Parameters

Name Type Default Description
$check stringornull null Pass a token here to compare it to the one in the session

Return types

stringorbool

Either the token or a boolean check result

This method modifies the existing $app object it is applied to and returns it again.

Parent class

Kirby\Cms\App