Elgg  Version master
securitytoken.php
Go to the documentation of this file.
1 <?php
8 $ts = elgg()->csrf->getCurrentTime()->getTimestamp();
9 $token = elgg()->csrf->generateActionToken($ts);
10 
11 echo elgg_view('input/hidden', ['name' => '__elgg_token', 'value' => $token]);
12 echo elgg_view('input/hidden', ['name' => '__elgg_ts', 'value' => $ts]);
elgg()
Bootstrapping and helper procedural code available for use in Elgg core and plugins.
Definition: elgglib.php:12
elgg_view(string $view, array $vars=[], string $viewtype='')
Return a parsed view.
Definition: views.php:156
$token
$ts
CSRF security token view for use with secure forms.