aboutsummaryrefslogtreecommitdiff
path: root/mod/cool_theme/views/default/input/securitytoken.php
blob: 75410848a4bfe292569895f7b7fc6e40a6fc0aff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
/**
 * CSRF security token view for use with secure forms.
 *
 * It is still recommended that you use input/form.
 *
 * @package Elgg
 * @subpackage Core
 */

$ts = time();
$token = generate_action_token($ts);

echo elgg_view('input/hidden', array('name' => '__elgg_token', 'value' => $token));
echo elgg_view('input/hidden', array('name' => '__elgg_ts', 'value' => $ts));