diff options
Diffstat (limited to 'views/default/input/securitytoken.php')
-rw-r--r-- | views/default/input/securitytoken.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/views/default/input/securitytoken.php b/views/default/input/securitytoken.php new file mode 100644 index 000000000..75410848a --- /dev/null +++ b/views/default/input/securitytoken.php @@ -0,0 +1,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)); |