aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/securitytoken.php
blob: fa202548ef886c1477c6081785f2396e452dd87b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?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));
?>