aboutsummaryrefslogtreecommitdiff
path: root/views/installation/input/securitytoken.php
blob: a2a4a0e017e081fb510812544b76cdcb4eaf74ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
/**
 * CSRF security token view for use with secure forms.
 *
 * It is still recommended that you use input/form.
 *
 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 */

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

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